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

GIFT export does not escape \ in the question text.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.3, 2.3
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      1. Create a question with \ and \ \ (but without the space. Stupid tracker) in the question text.
      2. Export this question in GIFT format.
      3. Import to another course.
      4. Verify that the question text has come through unmodified.

      Show
      1. Create a question with \ and \ \ (but without the space. Stupid tracker) in the question text. 2. Export this question in GIFT format. 3. Import to another course. 4. Verify that the question text has come through unmodified.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      I have several hundreds of quiz questions that use TeX to render mathematical equations in Moodle 1.9.

      I've just installed the new version of Moodle 2.2. I exported my question categories from Moodle 1.9 in GIF format and imported them to Moodle 2.3. During this process, Moodle 2.2 deletes one of the double backslashes that TeX uses to build mathematical Matrices.

      Since I can't upload example files here, I'll leave you with an example of what happened to one of the questions:

      -> Question exported from Moodle 1.9

      // question: 743  name: InversaCalculo_01 
      ::InversaCalculo_01::[html]<p><span>A inversa da matriz $$A \= \left[ \{\begin\{array\}1 &amp; 0 &amp; 0\\0 &amp; 1&amp; 0\\1 &amp; 0 &amp; 1\\ \end\{array\}\} \right]$$ é </span></p>\n<p></p>\n<p></p>\n<p></p>{
      	=$$\left[ \{\begin\{array\}1 & 0 & 0\\0 & 1& 0\\-1 & 0 & 1\\ \end\{array\}\} \right]$$
      	~%-33.333%$$\left[ \{\begin\{array\}1 & 0 & 0\\0 & -1& 0\\1 & 0 & -1\\ \end\{array\}\} \right]$$
      	~%-33.333%$$\left[ \{\begin\{array\}1 & 1 & 0\\0 & 1& 0\\1 & 0 & 1\\ \end\{array\}\} \right]$$
      	~%-33.333%$$\left[ \{\begin\{array\}-1 & 0 & 0\\0 & 1& 0\\1 & 0 & -1\\ \end\{array\}\} \right]$$
      }

      -> Same question after importing to Moodle 2.2 (the same thing happens in Moodle 2.3)

      // question: 4  name: InversaCalculo_01
      ::InversaCalculo_01::[html]<p><span>A inversa da matriz $$A \= \left[ \{\begin\{array\}1 &amp; 0 &amp; 0\0 &amp; 1&amp; 0\1 &amp; 0 &amp; 1\ \end\{array\}\} \right]$$ é </span></p>\n<p> </p>\n<p> </p>{
      	=<p>$$\left[ \{\begin\{array\}1 &amp; 0 &amp; 0\0 &amp; 1&amp; 0\-1 &amp; 0 &amp; 1\ \end\{array\}\} \right]$$</p>
      	~<p>$$\left[ \{\begin\{array\}1 &amp; 0 &amp; 0\0 &amp; -1&amp; 0\1 &amp; 0 &amp; -1\ \end\{array\}\} \right]$$</p>
      	~<p>$$\left[ \{\begin\{array\}1 &amp; 1 &amp; 0\0 &amp; 1&amp; 0\1 &amp; 0 &amp; 1\ \end\{array\}\} \right]$$</p>
      	~<p>$$\left[ \{\begin\{array\}-1 &amp; 0 &amp; 0\0 &amp; 1&amp; 0\1 &amp; 0 &amp; -1\ \end\{array\}\} \right]$$</p>
      }

      Thank you!

        Attachments

        1. math_choices.png
          math_choices.png
          75 kB
        2. math_questiontext.png
          math_questiontext.png
          35 kB
        3. matrix_question.png
          matrix_question.png
          173 kB
        4. newtex.gift.txt.txt
          0.9 kB
        5. tex.gift.txt
          0.6 kB

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            luciana_lgo Luciana
            Integrator:
            Dan Poltawski
            Tester:
            Adrian Greeve
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, 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:
              10/Sep/12