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

Add a setting to clarify how the grading works to multi-answer multi-choice question in lesson



    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1, 2.2, 2.3
    • Fix Version/s: DEV backlog
    • Component/s: Lesson
    • Labels:
    • Affected Branches:


      When a lesson contains a multi-answer, multiple choice question and the student's answer is partially correct, the wrong feedback is displayed. Specifically, the feedback response for the last incorrect option is displayed no matter what the student actually submitted.

      This was reported to us in both 1.9 and 2.x. I was able to duplicate the issue in 2.1.3.

      I have a question, "Which of the following colors are shades of blue?" The choices are Navy, Turquoise, Cerulean, and Crimson. The first three are correct answers and the last is not. The feedback responses are "Yes, ___ is a shade of blue" for the first three with the blank filled in with the name of the selection. The last feedback response is "Sorry, crimson is not a shade of blue." If the student selects any one or two of the first three options (but not all three because that would be a fully correct answer), the feedback is always "Sorry, crimson is not a shade of blue" even though the student didn't select crimson as a choice. See attached screenshot.

      In mod/lesson/pagetypes/multichoice.php, the answers are looped over with correct answer feedback and incorrect answer feedback written into $correctresponse and $wrongresponse, respectively, but each response overwrites the previous one. In my example, navy is overwritten by turquoise, which is then overwritten by cerulean. Then this (simplified) code is reached:

      if ((count($studentanswers) == $ncorrect) and ($nhits == $ncorrect))

      { $result->response = $correctresponse; }


      { $result->response = $wrongresponse; }

      Unless the student submitted a 100% correct answer (i.e., selected all three, and only all three, of the shades of blue), they will receive $wrongresponse, which will be the feedback response for the last incorrect answer, regardless of what they actually selected.

      This wouldn't necessarily be a problem if the teacher used very generic responses, such as "Yes, that's correct" and "Sorry, try again." If the expectation is that a teacher would use generic responses like those then it would be a lot less confusing to teachers to simply use "Correct Answer Feedback" and "Incorrect Answer Feedback" rather than having specific feedback responses for each choice. Otherwise, the question type should be modified a bit to better handle partially correct answers of multi-answer questions.


          Issue Links



              Unassigned Unassigned
              rwijaya Rossiani Wijaya
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              0 Vote for this issue
              1 Start watching this issue