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

Deleting category used in a random question breaks the quiz structure

XMLWordPrintable

      The new random question engine doesn't manage well when a category, linked by a random question, is deleted.

      Steps to reproduce the exception:

      • create course "test"
      • create question category "test category" in the course question bank
      • create a question "test question" in "test category" category
      • create a quiz "test quiz"
      • add a random question from category "test category"

      Until now everything works fine. Now:

      • delete category "test category" in the question bank
      • return to "test quiz" and click on "Questions", you'll see the following exception:

      Exception - mod_quiz\structure::get_used_category_description(): Argument #1 ($qcategory) must be of type stdClass, null given, called in [dirroot]/mod/quiz/classes/structure.php on line 1764

      This bug is blocking because the quiz become unusable and you cannot fix it.

      Regards,
      Giorgio

        1. MDL-83784.png
          50 kB
          CMR
        2. MDL-83784-1.png
          240 kB
          Ron Carl Alfon Yu

            cwarwicker CMR
            kemmotar Giorgio Riva
            Mark Johnson Mark Johnson
            Tim Hunt Tim Hunt
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            3 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 15 minutes
                2h 15m

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