From: tjhunt Date: Tue, 8 Jan 2008 18:29:20 +0000 (+0000) Subject: MDL-12785 - Partially correct tick icon not displayed for MULTICHOICE, single answer... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a656e0de488d2e29d8fbf533d097755e6bf72f4d;p=moodle.git MDL-12785 - Partially correct tick icon not displayed for MULTICHOICE, single answer questions. Fix thanks to Joseph Rézeau. Merged from MOODLE_18_STABLE. --- diff --git a/question/type/multichoice/questiontype.php b/question/type/multichoice/questiontype.php index 92f5dfbc15..0c1207d1d5 100644 --- a/question/type/multichoice/questiontype.php +++ b/question/type/multichoice/questiontype.php @@ -309,7 +309,11 @@ class question_multichoice_qtype extends default_questiontype { $a->class = question_get_feedback_class(1); } if (($options->feedback && $chosen) || $options->correct_responses) { - $a->feedbackimg = question_get_feedback_image($answer->fraction > 0 ? 1 : 0, $chosen && $options->feedback); + if ($type == ' type="checkbox" ') { + $a->feedbackimg = question_get_feedback_image($answer->fraction > 0 ? 1 : 0, $chosen && $options->feedback); + } else { + $a->feedbackimg = question_get_feedback_image($answer->fraction, $chosen && $options->feedback); + } } // Print the answer text