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

Moodle XML question export fails with a fatal error if there is an unrecognised qtype in the question bank.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.1.6, 2.2.3
    • 2.1.5, 2.2.2
    • Questions
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • Hide

      1. Go into the question bank for a course. Note the id of a question.

      2. Go into the database, and edit the value in the 'qtype' column for that question, to be something unrecognised, like unknownqtype.

      3. Export the questions from this category, and make sure that there is not a fatal error.

      4. Inspect the exported file, and make sure that all the questions that were in the question category were exported, except for the one you hacked.

      (5. Optional, you may wish to set question.qtype back to the original value.)

      Show
      1. Go into the question bank for a course. Note the id of a question. 2. Go into the database, and edit the value in the 'qtype' column for that question, to be something unrecognised, like unknownqtype. 3. Export the questions from this category, and make sure that there is not a fatal error. 4. Inspect the exported file, and make sure that all the questions that were in the question category were exported, except for the one you hacked. (5. Optional, you may wish to set question.qtype back to the original value.)

      Because of testing other bugs, I had a question in my database where I had manually edited the question type to 'unknownqtype'. This caused a fatal error on export. Instead, I think this sort of question should just be silently skipped, so you can still export the other questions.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Dan Poltawski Dan Poltawski
            Adrian Greeve Adrian Greeve
            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.