]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-21336 testing with $correct != '' so that correct answer 0 is shown
authorPierre Pichet <pichet.pierre@uqam.ca>
Thu, 14 Jan 2010 01:29:46 +0000 (01:29 +0000)
committerPierre Pichet <pichet.pierre@uqam.ca>
Thu, 14 Jan 2010 01:29:46 +0000 (01:29 +0000)
question/type/shortanswer/questiontype.php

index e023f003475be1c2511c9f69ba0bcc79455a5ff6..1abd4d419fe3a8016a0160820c6eeaf3cd47692f 100644 (file)
@@ -325,7 +325,7 @@ class question_shortanswer_qtype extends default_questiontype {
                 $class = question_get_feedback_class($state->last_graded->raw_grade /
                         $question->maxgrade);
                 echo '<div class="correctness ' . $class . '">' . get_string($class, 'quiz');
-                if ($correctanswer && ($class == 'partiallycorrect' || $class == 'incorrect')) {
+                if ($correctanswer  != '' && ($class == 'partiallycorrect' || $class == 'incorrect')) {
                     echo ('<div class="correctness">');
                     print_string('correctansweris', 'quiz', s($correctanswer));
                     echo ('</div>');