From: moodler Date: Thu, 23 Oct 2003 15:40:17 +0000 (+0000) Subject: Fix bug in NUMERICAL questions where feedback was only shown if the X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=16a1917250e3eede8f2a83feca57851f4fc0d7ea;p=moodle.git Fix bug in NUMERICAL questions where feedback was only shown if the question was correct --- diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 7605b3b1de..01f48a1d4f 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -1613,6 +1613,7 @@ function quiz_grade_attempt_question_result($question, $answers) { if ($answer->fraction > $bestshortanswer) { $correct[$answer->id] = $answer->answer; $bestshortanswer = $answer->fraction; + $feedback[0] = $answer->feedback; // Show feedback for best answer } if ('' != $question->answer // Must not be mixed up with zero! && (float)$answer->fraction > (float)$grade // Do we need to bother? @@ -1622,7 +1623,7 @@ function quiz_grade_attempt_question_result($question, $answers) { && ((float)$question->answer >= (float)$answer->min) && ((float)$question->answer <= (float)$answer->max)) { - $feedback[0] = $answer->feedback; + //$feedback[0] = $answer->feedback; No feedback was shown for wrong answers $grade = (float)$answer->fraction; } }