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

Matching question type does not support wrong-only response

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.0.1
    • 1.9.8, 2.0
    • Lesson
    • MySQL
    • MOODLE_19_STABLE, MOODLE_20_STABLE
    • MOODLE_20_STABLE
    • Moderate

      If you create a matching question and provide responses for both correct and wrong answers, everything works as expected.

      If you provide a response only for wrong answers, this response (that may e.g. give hints how to correct the answers) is unexpectedly shown when the question is answered correctly.

      The reason is the way responses are extracted from the answers list in continue.php. Although the first two entries are (according to the comment) reserved for the right and wrong answer, they are not simply used for the responses. Instead, there is a search for the first and the second entry in $answers where $answer->response is NULL and $answer->answer ist not NULL. The matching_answer->answer is used as response. Therefore, if you enter only one response in the form, this automatically becomes the response for the "correct" case, even if entered as response for the "wrong" case.

            samhemelryk Sam Hemelryk
            mnlipp Michael Lipp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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