From 89aa5d49eee8851138761a4912dd9fd0cff5c8fc Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Fri, 16 Sep 2005 09:30:54 +0000 Subject: [PATCH] Maximum number of answers now governed by constant in locallib.php not by hardcoded value. --- mod/quiz/format/gift/format.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mod/quiz/format/gift/format.php b/mod/quiz/format/gift/format.php index 8a25d35b921..c1e3b6911a1 100755 --- a/mod/quiz/format/gift/format.php +++ b/mod/quiz/format/gift/format.php @@ -100,7 +100,6 @@ class quiz_format_gift extends quiz_default_format { } 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 @@ class quiz_format_gift extends quiz_default_format { 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 "

$text

\n"; echo "

$errormessage

"; }