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

IMS Common Cartridge import fails when URLs have & in them

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 3.3.1
    • Backup: IMS-CC
    • MOODLE_33_STABLE

      When a Web Link or BasicLTI launch URL includes an Ampersand (&) Moodle dies during import with a message like:

      Fatal Error in [tempdir] ../moodle.xml: EntityRef: expecting ';' at line 250

      Tracing things through, the cartridge is XML so the entity version is correct - as Moodle unzips and extracts the cartridge it is mapped back  to "&" but then as Moodle produces the moodle.xml file (also XML) it fails to re-encode from "&" as an entity so something like "&x=42" looks like a malformed "entity" to the XML parser, leading to the error.

      I have attached a two-item cartridge with no ampersands in the urls, and one with ampersands in the URLs.  I have screen shots of the successful import on demo.moodle.net as well as the failed import on demo.moodle.net as well as a look at the moodle.xml file (from a different, larger import) showing what went wrong in moodle.xml.

        1. MDL-59993-Good-Import.png
          225 kB
          Charles Severance
        2. MDL-59993-Fail-Import.png
          180 kB
          Charles Severance
        3. MDL-59993-XML-Oops.png
          189 kB
          Charles Severance
        4. moodle.xml
          184 kB
          Charles Severance
        5. IMS_CC_11_AMPERSAND.imscc
          3 kB
          Charles Severance
        6. IMS_CC_11_NORMAL.imscc
          3 kB
          Charles Severance
        7. py4e_export.imscc
          70 kB
          Charles Severance

            Unassigned Unassigned
            drchuck Charles Severance
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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