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

Formats of all questions are converted to moodle_auto_format after xml import

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.9
    • Fix Version/s: 1.9.10
    • Component/s: Questions, Quiz
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      It has been found when I use the Moodle XML export and import. As my questions have some javascript in it so the question type is chosen to be 'html'. However, after importing the questions, it automatically converts the question type to 'moodle auto format' and it ruins my javascript.

      It can be seen in the database table moodle_question, the questiontextformat are always set to 0 after importing. In the xml file:

      <questiontext format="html">

      Replace the "html" by "moodle_auto_format", "plain_text", "markdown", All of them give the same result questiontextformat=0 in the database table. A simple xml file is attached, just try the Moodle XML import of this file.

      A little testing on a new install of moodle 1.9.9 shows that it affect all build in question types as well as plug-in question. However, it seems that there is no problem for the import to a moodle 2.0.

        Gliffy Diagrams

          Activity

          Hide
          hwlau hon wai lau added a comment -

          The expected questiontextformat should be

          0: "moodle_auto_format"
          1: "html"
          2: "plain_text"
          4: "markdown"

          Show
          hwlau hon wai lau added a comment - The expected questiontextformat should be 0: "moodle_auto_format" 1: "html" 2: "plain_text" 4: "markdown"
          Hide
          timhunt Tim Hunt added a comment -

          Should be fixed now.

          Show
          timhunt Tim Hunt added a comment - Should be fixed now.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Oct/10