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

< character in answers not escaped in Moodle XML export of multiple choice calculated questions

XMLWordPrintable

    • MOODLE_36_STABLE, MOODLE_402_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-69119-M401_angle_bracket_character_in_answers_not_escaped_in_moodle_xml_export_of_multiple_choice_calculated_questions
    • MDL-69119_angle_bracket_character_in_answers_not_escaped_in_moodle_xml_export_of_multiple_choice_calculated_questions
    • Hide
      1. Create a multiple choice calculated questions and fill the text with: "If x = {param}

        , what should the value of z be? Remember that < mean less-than."

      2. fill the answers with:
        • z < {param}
        • z<{=2*{param}}
      3. Assign any number to the paramter.
      4. In the question bank, chose action "Export as Moodle XML" for the question you created.
      5. Go to the question bank in another course.
      6. Select 'Import' in the tertiary navigation menu.
      7. Select 'Moodle XML' format, and upload the file you just exported.
      8. Edit the newly imported question.
      9. Verify that all the information about the question is the same as the origian.

      (Except, possibly, it may ne the case that the param value is not included in the export. However, that has not been changed here. If that is a bug - I am not sure - then it should be created as a separate bug report.)

      Show
      Create a multiple choice calculated questions and fill the text with: "If x = {param} , what should the value of z be? Remember that < mean less-than." fill the answers with: z < {param} z<{=2*{param}} Assign any number to the paramter. In the question bank, chose action "Export as Moodle XML" for the question you created. Go to the question bank in another course. Select 'Import' in the tertiary navigation menu. Select 'Moodle XML' format, and upload the file you just exported. Edit the newly imported question. Verify that all the information about the question is the same as the origian. (Except, possibly, it may ne the case that the param value is not included in the export. However, that has not been changed here. If that is a bug - I am not sure - then it should be created as a separate bug report.)

      Unfortunately i don't have access to the information about the Moodle version, which should however be fairly recent.

      To reproduce the problem:

      • Create a multiple choice calculated questions and fill the text with: "If x = {param}, what should the value of z be? Remember that < mean less-tha"
      • fill the answers with:
        • z < {param}
        • z<{=2*{param}}
      • Assign whatever value set to the paramter
      • Export the question in "Moodle XML" format
      • Inspecting the xml shows that the "<" character is correctly escaped in the text of the question, but not in the answers. If you try to import the question, you get an error pointing to the unescaped "<" character.

       

       

            Daniel Ziegenberg Daniel Ziegenberg
            Ciani Giacomo Ciani
            Tim Hunt Tim Hunt
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 56 minutes
                1h 56m

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