]> git.mjollnir.org Git - moodle.git/commitdiff
The way mulit-response questoins show the right answer is a bit confusing.
authortjhunt <tjhunt>
Wed, 17 Jan 2007 14:54:55 +0000 (14:54 +0000)
committertjhunt <tjhunt>
Wed, 17 Jan 2007 14:54:55 +0000 (14:54 +0000)
question/type/multichoice/questiontype.php

index fda824f50be8c2738044399597973abf0baf0769..916afc8e66ee685c7ce3bba456b611c16959d7b6 100644 (file)
@@ -312,10 +312,10 @@ class question_multichoice_qtype extends default_questiontype {
 
             if ($options->readonly) {
                 // Means we need to display answer correctness.
-                if ($chosen) {
-                    $a->class = question_get_feedback_class($answer->fraction);
+                if ($answer->fraction > 0) {
+                    $a->class = question_get_feedback_class(1);
                 }
-                $a->feedbackimg = question_get_feedback_image($answer->fraction, $chosen);
+                $a->feedbackimg = question_get_feedback_image($answer->fraction > 0 ? 1 : 0, $chosen);
             }
 
             // Print the answer text