Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

by hardcoded value.
  • Loading branch information...
commit 89aa5d49eee8851138761a4912dd9fd0cff5c8fc 1 parent a4df55c
thepurpleblob authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 mod/quiz/format/gift/format.php
View
5 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>";
}
Please sign in to comment.
Something went wrong with that request. Please try again.