From: Pierre Pichet Date: Thu, 14 Jan 2010 01:29:46 +0000 (+0000) Subject: MDL-21336 testing with $correct != '' so that correct answer 0 is shown X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fbe60eb3ea5f1ac597c758aadb6a479feb2062a6;p=moodle.git MDL-21336 testing with $correct != '' so that correct answer 0 is shown --- diff --git a/question/type/shortanswer/questiontype.php b/question/type/shortanswer/questiontype.php index e023f00347..1abd4d419f 100644 --- a/question/type/shortanswer/questiontype.php +++ b/question/type/shortanswer/questiontype.php @@ -325,7 +325,7 @@ class question_shortanswer_qtype extends default_questiontype { $class = question_get_feedback_class($state->last_graded->raw_grade / $question->maxgrade); echo '
' . get_string($class, 'quiz'); - if ($correctanswer && ($class == 'partiallycorrect' || $class == 'incorrect')) { + if ($correctanswer != '' && ($class == 'partiallycorrect' || $class == 'incorrect')) { echo ('
'); print_string('correctansweris', 'quiz', s($correctanswer)); echo ('
');