Moodle
  1. Moodle
  2. MDL-31266

Lesson with multi-answer multi-choice question shows wrong feedback for partially correct answers

    Details

    • Testing Instructions:
      Hide
      1. create lesson with multi-answer multi-choice questions (with at least 1 wrong option), ensure to give feedback for answers
      2. as student, attempt the lesson with one wrong and wrong right answer
      3. on question feedback page, notice the responses for each selected answers are display.
      Show
      create lesson with multi-answer multi-choice questions (with at least 1 wrong option), ensure to give feedback for answers as student, attempt the lesson with one wrong and wrong right answer on question feedback page, notice the responses for each selected answers are display.
    • Workaround:
      Hide

      Use generic correct/incorrect feedback responses.

      Show
      Use generic correct/incorrect feedback responses.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Rank:
      37731

      Description

      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.

      Example:
      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;
                  } else {
                      $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

          Activity

          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this.

          I've put that on the backlog.

          In the meantime feel free to help us work on this issue.

          Show
          Michael de Raadt added a comment - Thanks for reporting this. I've put that on the backlog. In the meantime feel free to help us work on this issue.
          Hide
          Rossiani Wijaya added a comment -

          Hi Chris

          This issue seems to require some improvement to multi-answer multi-choice questions. Currently there is no setting within this type of question to indicate only x amount of choices required to be graded as correct.

          I will ask Martin and other developers' opinion on whether this issue should be fix in stable or master branch.

          Show
          Rossiani Wijaya added a comment - Hi Chris This issue seems to require some improvement to multi-answer multi-choice questions. Currently there is no setting within this type of question to indicate only x amount of choices required to be graded as correct. I will ask Martin and other developers' opinion on whether this issue should be fix in stable or master branch.
          Hide
          Martin Dougiamas added a comment -

          My suggestion after quickly looking at this would be:

          STABLE <=2.2 : Do not change the right/wrong calculation, but improve the feedback so that the responses are concatenated instead of overwritten. It's still awkward but at least it's correct.

          DEV >= 2.3 : Add a setting to clarify how the grading works. Use the qtype from quiz as a model (as far as possible).

          Show
          Martin Dougiamas added a comment - My suggestion after quickly looking at this would be: STABLE <=2.2 : Do not change the right/wrong calculation, but improve the feedback so that the responses are concatenated instead of overwritten. It's still awkward but at least it's correct. DEV >= 2.3 : Add a setting to clarify how the grading works. Use the qtype from quiz as a model (as far as possible).
          Hide
          Ankit Agarwal added a comment -

          Hi Rosie,
          Looks good now,
          +1 to integrate.

          Dont forget to link the issue to create the new feature in 2.3
          Thanks

          Show
          Ankit Agarwal added a comment - Hi Rosie, Looks good now, +1 to integrate. Dont forget to link the issue to create the new feature in 2.3 Thanks
          Hide
          Rossiani Wijaya added a comment -

          Thank Ankit for reviewing.

          The new feature will be address in MDL-32021.

          Submitting for integration review.

          Show
          Rossiani Wijaya added a comment - Thank Ankit for reviewing. The new feature will be address in MDL-32021 . Submitting for integration review.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Dan Poltawski added a comment -

          Thanks this has been integrated now.

          I also cherry picked this into master to ensure consistency in case MDL-32021 doesn't get fixed before 2.3 release.

          Show
          Dan Poltawski added a comment - Thanks this has been integrated now. I also cherry picked this into master to ensure consistency in case MDL-32021 doesn't get fixed before 2.3 release.
          Hide
          Dan Poltawski added a comment -

          I have updated the testing instructions to make them clearer for what the issue is [to me] let me know if this is not correct.

          Show
          Dan Poltawski added a comment - I have updated the testing instructions to make them clearer for what the issue is [to me] let me know if this is not correct.
          Hide
          Michael de Raadt added a comment -

          Test result: Success.

          Tested in 2.1, 2.2 and master.

          Show
          Michael de Raadt added a comment - Test result: Success. Tested in 2.1, 2.2 and master.
          Hide
          Sam Hemelryk added a comment -

          Congratulations are in order, you've made it, or at least your code has!
          It's now part of Moodle and both the git and cvs repositories have been updated.

          This issue is being marked as fixed and closed.

          Thank you.

          Show
          Sam Hemelryk added a comment - Congratulations are in order, you've made it, or at least your code has! It's now part of Moodle and both the git and cvs repositories have been updated. This issue is being marked as fixed and closed. Thank you.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: