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

Cannot remove a bad question from a quiz

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.4, 2.4.1
    • Fix Version/s: 2.3.5, 2.4.2, 2.5
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      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.)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Mar/13