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

Match question throws PHP error if one or more options have not been selected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.3.7, 2.4.4
    • 2.3.6, 2.4, 2.5
    • Lesson
    • None
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • Hide
      1. Create lesson activity
      2. Add matching question
      3. Preview the question
      4. Do not answer any question.
      5. Click submit
      6. Make sure there's no error display and the following message is displayed "One or more questions have no answer given. Please go back and submit an answer."
      Show
      Create lesson activity Add matching question Preview the question Do not answer any question. Click submit Make sure there's no error display and the following message is displayed "One or more questions have no answer given. Please go back and submit an answer."

      In Moodle 2, with debug mode ON, a Match question throws PHP error if one or more options have not been selected:
      Notice: Undefined index: in moodle\mod\lesson\pagetypes\matching.php on line 188

      Plus: if NO options selected at all, the "No answer given. Please go back and submit an answer." never gets displayed.

      I will submit an easy fix on my github.

            rwijaya Rossiani Wijaya
            rezeau Joseph Rézeau
            Ankit Agarwal Ankit Agarwal
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Sam Hemelryk Sam Hemelryk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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