Permalink
Browse files

Maximum number of answers now governed by constant in locallib.php not

by hardcoded value.
  • Loading branch information...
1 parent a4df55c commit 89aa5d49eee8851138761a4912dd9fd0cff5c8fc thepurpleblob committed Sep 16, 2005
Showing with 2 additions and 3 deletions.
  1. +2 −3 mod/quiz/format/gift/format.php
@@ -100,7 +100,6 @@ function escapedchar_post($string) {
}
function check_answer_count( $min, $answers, $text ) {
- // max is always 10 of course!
$countanswers = count($answers);
if ($countanswers < $min) {
if ($this->displayerrors) {
@@ -111,9 +110,9 @@ function check_answer_count( $min, $answers, $text ) {
return false;
}
- if ($countanswers>10) {
+ if ($countanswers>QUIZ_MAX_NUMBER_ANSWERS) {
if ($this->displayerrors) {
- $errormessage = get_string( 'importmax10error', 'quiz' );
+ $errormessage = get_string( 'importmaxerror', 'quiz' );
echo "<p>$text</p>\n";
echo "<p>$errormessage</p>";
}

0 comments on commit 89aa5d4

Please sign in to comment.