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

Cannot remove a bad question from a quiz

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.3.5, 2.4.2, 2.5
    • 2.3.4, 2.4.1
    • Quiz
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Hide

      Setting this up is a bit tricky. Sorry.

      1. Create a quiz in a course, and add some questions to it.

      2. Go into the database, and edit mdl_quiz.questions field for that quiz. That is a comma-separated list of question ids. Change one of those ids to a non-existant value.

      3. Make the same change of question id in the corresponding row of the quiz_question_instances table.

      4. Now go to the quiz edit screen. The broken questions will be displayed soemthing like "This quiz contains a question that seems to have been deleted". Make sure you can remove that from the quiz using the 'x' icon.

      Show
      Setting this up is a bit tricky. Sorry. 1. Create a quiz in a course, and add some questions to it. 2. Go into the database, and edit mdl_quiz.questions field for that quiz. That is a comma-separated list of question ids. Change one of those ids to a non-existant value. 3. Make the same change of question id in the corresponding row of the quiz_question_instances table. 4. Now go to the quiz edit screen. The broken questions will be displayed soemthing like "This quiz contains a question that seems to have been deleted". Make sure you can remove that from the quiz using the 'x' icon.

      Sometimes, due to a bug (e.g. in restore) you get a quiz referring to a question that does not exist. Following past bug fixes, this is displayed quite nicely.

      However, since MDL-32240, you get an error if you try to remove such a bogus question from the quiz (which is, after all, the only sensible thing to do to it.)

            timhunt Tim Hunt
            timhunt Tim Hunt
            Damyon Wiese Damyon Wiese
            David Monllaó David Monllaó
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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