Partially correct tick icon not displayed for MULTICHOICE, single answer questions.
IF a MULTICHOICE (single answer) question has, besides one 100% graded correct answer, one or more questions graded less than 100%, then if one of those is selected by the student, the quiz correctly displays a "Partially correct" feedback message but wrongly displays a correct tick icon (tick_green_big.gif) rather than the expected partially correct orange tick icon (tick_amber_big.gif).
On the other hand, the behavior is as expected for a MULTICHOICE multianswer question.
I am attaching the patch against current moodle 1.8 question/type/multichoice/questiontype.php file.
-
-
- Eclipse Workspace Patch 1.0
#P moodle18dev
Index: question/type/multichoice/questiontype.php
===================================================================
RCS file: /cvsroot/moodle/moodle/question/type/multichoice/questiontype.php,v
retrieving revision 1.16.2.7
diff -u -r1.16.2.7 questiontype.php
- question/type/multichoice/questiontype.php 10 Aug 2007 15:21:17 -0000 1.16.2.7
+++ question/type/multichoice/questiontype.php 31 Dec 2007 15:22:47 -0000
@@ -312,7 +312,11 @@
$a->class = question_get_feedback_class(1);
}
if (($options->feedback && $chosen) || $options->correct_responses) {
- Eclipse Workspace Patch 1.0
-
- $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); + }}
// Print the answer text
Joseph