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

Unrecognised question type breaks XML import

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 1.9.5, 2.0
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      I found this while testing MDL-18555, becuase I tested the wrong thing! Steps to reproduce

      1. Export some questions from Moodle in Moodle XML format.
      2. Edit the XML file <question type="..."> to something unrecognised like <question type="frog">
      3. Try to import that file.

      Actual result:

      You get an ugly error:

      An error occurred during import processing

      More information about this error
      Stack trace:

      • line 5772 of lib/weblib.php: call to debugging()
      • line 141 of question/import.php: call to print_error()

      Expected result:

      A polite message, something like

      Unrecognised question type 'frog' found in the file. Skipping.

        Attachments

          Activity

            People

            Assignee:
            howardsmiller Howard Miller
            Reporter:
            timhunt Tim Hunt
            Tester:
            Nicolas Connault Nicolas Connault
            Participants:
            Component watchers:
            Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/May/09