From fbe60eb3ea5f1ac597c758aadb6a479feb2062a6 Mon Sep 17 00:00:00 2001 From: Pierre Pichet Date: Thu, 14 Jan 2010 01:29:46 +0000 Subject: [PATCH] MDL-21336 testing with $correct != '' so that correct answer 0 is shown --- question/type/shortanswer/questiontype.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ('
'); -- 2.39.5