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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.8.3, 1.9
    • Fix Version/s: 1.8.4, 1.9
    • Component/s: Quiz
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              timhunt Tim Hunt
              Reporter:
              rezeau Joseph Rézeau
              Tester:
              Nobody
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jan/08