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.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.5, 2.2.2
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      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.)
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/12