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

Quiz previews can get into a broken state if questions used by a random question are deleted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.9.9, 3.10.6, 3.11.2
    • Quiz
    • None
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE

      Steps to reproduce:

      1. Create a quiz (you can leave all settings default, just give it a name).
      2. Edit quiz.
      3. Add -> Random question -> From new category, call the category 'Q1 variants'.
      4. Click '(See questions)' link (easiest to open in a new tab).
      5. Add a true-false question. (Qtype does not matter, but for TF you only need to type name and question text.)
      6. Start a Preview of the quiz (easiest back in the first tab).
      7. In the question bank, delete the TF question you created.
      8. In the browser window where you have the preview open, reload the page.

      Actual result: Cryptic error which is hard to recover from.

      Expected result: Obviously it cannot work, because the question is gone (correctly - previews should not prevent questions from being deleted) however, the error message should make sense, in the style of MDL-61033.

      Two ways to achive this I can think of:

      A) Custom exception handling for this case.

      B) Use an event handler, so that when a question is deleted, the preview is automatically deleted.

      Or, it may be that the question bank 4.0 work (MDL-70329) means that this stops being an issue.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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