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

Quiz with missing question cannot be fixed through the UI

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      Becuase of other code changes, the fix would not cherry-pick cleanly 2.1 -> 2.2. Therefore, this needs to be tested in both 2.1 and 2.2.

      1. Create a quiz with a few questions.
      2. Go into the DB, in the mod/quiz table, and add 666, to the start of quiz.questions. Here, 666 is assumed to be any question id that does not exist.
      3. View the quiz edit page, and made sure the missing question is shown in a way that makes sense to you.
      4. Verify that the missing question can be re-ordered and deleted.
      5. Verify that, once the missing question has been deleted, you can then preview the quiz.
      Show
      Becuase of other code changes, the fix would not cherry-pick cleanly 2.1 -> 2.2. Therefore, this needs to be tested in both 2.1 and 2.2. Create a quiz with a few questions. Go into the DB, in the mod/quiz table, and add 666, to the start of quiz.questions. Here, 666 is assumed to be any question id that does not exist. View the quiz edit page, and made sure the missing question is shown in a way that makes sense to you. Verify that the missing question can be re-ordered and deleted. Verify that, once the missing question has been deleted, you can then preview the quiz.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Suppose a quiz gets into a state where $quiz->questions includes a question that no longer exists. It should be impossible for this to happen, but it happened at the OU.

      Then, the missing question does not appear on mod/quiz/edit.php, but when you try to start the quiz, you get a fatal error "Cannot start an attempt at this quiz. The quiz definition includes a question that does not exist."

      What should happen, in this messed up situation, is that the missing question should show up on mod/quiz/edit.php in a suitable way, so you can remove it from the quiz.

      (Would also be good to find the rood cause of how we got into this mess, to prevent it happening again.)

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12