From: tjhunt Date: Fri, 12 Jan 2007 12:20:21 +0000 (+0000) Subject: MDL-7496 - for numerical and short answer questions, the student was being told they... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a840456731e41b1fc9e2745d9a65d203be3b816b;p=moodle.git MDL-7496 - for numerical and short answer questions, the student was being told they were 'incorrect' before they had even had a chance to enter an answer! --- diff --git a/question/type/shortanswer/questiontype.php b/question/type/shortanswer/questiontype.php index 6d7aa9149a..2919c756af 100644 --- a/question/type/shortanswer/questiontype.php +++ b/question/type/shortanswer/questiontype.php @@ -146,11 +146,12 @@ class question_shortanswer_qtype extends default_questiontype { $inputname = ' name="'.$nameprefix.'" '; $feedback = ''; - // Assume wrong answer first. - $class = question_get_feedback_class(0); - $feedbackimg = question_get_feedback_image(0); + $class = ''; + $feedbackimg = ''; if ($options->feedback) { + $class = question_get_feedback_class(0); + $feedbackimg = question_get_feedback_image(0); foreach($question->options->answers as $answer) { if ($this->test_response($question, $state, $answer)) {