]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7496 - for numerical and short answer questions, the student was being told they...
authortjhunt <tjhunt>
Fri, 12 Jan 2007 12:20:21 +0000 (12:20 +0000)
committertjhunt <tjhunt>
Fri, 12 Jan 2007 12:20:21 +0000 (12:20 +0000)
question/type/shortanswer/questiontype.php

index 6d7aa9149a190c30ad4280401c8edee1b8742734..2919c756af89ea4389fbfb9a1cdfc6fc312187f8 100644 (file)
@@ -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)) {