diff --git a/mod/quiz/lang/en/quiz.php b/mod/quiz/lang/en/quiz.php index d71908c87567a..a0989b78ddff7 100644 --- a/mod/quiz/lang/en/quiz.php +++ b/mod/quiz/lang/en/quiz.php @@ -159,6 +159,7 @@ $string['categorynoedit'] = 'You do not have editing privileges in the category \'{$a}\'.'; $string['categoryupdated'] = 'The category was successfully updated'; $string['close'] = 'Close window'; +$string['closed'] = 'Closed'; $string['closebeforeopen'] = 'Could not update the quiz. You have specified a close date before the open date.'; $string['closepreview'] = 'Close preview'; $string['closereview'] = 'Close review'; diff --git a/question/type/multichoice/questiontype.php b/question/type/multichoice/questiontype.php index aa555188c98e2..d82366f7cf357 100644 --- a/question/type/multichoice/questiontype.php +++ b/question/type/multichoice/questiontype.php @@ -358,6 +358,23 @@ function print_question_formulation_and_controls(&$question, &$state, $cmoptions include("$CFG->dirroot/question/type/multichoice/display.html"); } + function compare_responses($question, $state, $teststate) { + if ($question->options->single) { + if (!empty($state->responses[''])) { + return $state->responses[''] == $teststate->responses['']; + } else { + return empty($teststate->response['']); + } + } else { + foreach ($question->options->answers as $ansid => $notused) { + if (empty($state->responses[$ansid]) != empty($teststate->responses[$ansid])) { + return false; + } + } + return true; + } + } + function grade_responses(&$question, &$state, $cmoptions) { $state->raw_grade = 0; if($question->options->single) {