Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-12785

Partially correct tick icon not displayed for MULTICHOICE, single answer questions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.8.4, 1.9
    • 1.8, 1.8.1, 1.8.2, 1.8.3, 1.9
    • Quiz
    • None
    • MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

      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.

          1. 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) {
      • $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

            timhunt Tim Hunt
            rezeau Joseph Rézeau
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.