Skip to content

Matrix Questions do not escape '&' characters on export, causing errors on import #151

Description

@spreissolms

Matrix question exports do not convert "&" to "&", causing import errors in Moodle XML format.

Here's a sample of what the file should look like on export
questions-maincourse-Matrix amp; not the movie-20260618-1145.xml

Here's an example of what the file looks like after export and no changes are made thereafter.

questions-maincourse-Matrix amp; not the movie-20260618-1145notadjusted.xml

Replication steps:

  1. Go to a course or create a new one, ensuring that as a prerequisite, matrix/kprime qtype is enabled under site administration
  2. Create a quiz, or edit an existing one
  3. Add a matrix question, with a few '&' characters in there.
  4. Export the question to Moodle XML format

Observed: '&' appears where '&' should be instead
Expected: Questions exported with correct '&' tags

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions