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

MathJax not working on Cloze questions under some circumstances

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Run unit tests
      2. Create a new quiz, adding a single Cloze question with the following HTML content:

        <ul><li>The <b>audio band frequency range </b>is:
        {1:MULTICHOICE:~%0%20Hz-2kHz~%0%2kHz-20kHz~%0%2Hz-20kHz~%100%20Hz-20kHz}
        .</li><li>The<b> capacitor's AC impedance</b> is: \( Z_C(j\omega )= \)
        {1:MULTICHOICE:~%0%\(j/(2\pi fC)\)~%100%\(-j/(2\pi fC)\)~%0%\(j2\pi
        fC\)~%0%\(-j2\pi fC\)}
        .</li></ul>
        

        (do not change the above in any way).

      3. Preview the question
        1. Confirm that the equation is correctly rendered (at least in Firefox, other browsers may not display TeX in drop downs)
      Show
      Run unit tests Create a new quiz, adding a single Cloze question with the following HTML content: <ul><li>The <b>audio band frequency range </b>is: {1:MULTICHOICE:~%0%20Hz-2kHz~%0%2kHz-20kHz~%0%2Hz-20kHz~%100%20Hz-20kHz} .</li><li>The<b> capacitor's AC impedance</b> is: \( Z_C(j\omega )= \) {1:MULTICHOICE:~%0%\(j/(2\pi fC)\)~%100%\(-j/(2\pi fC)\)~%0%\(j2\pi fC\)~%0%\(-j2\pi fC\)} .</li></ul> (do not change the above in any way). Preview the question Confirm that the equation is correctly rendered (at least in Firefox, other browsers may not display TeX in drop downs)
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-47712-master
    • Sprint:
      FRONTEND Sprint 16, Team B Sprint 1, Team Beards Sprint 2
    • Issue size:
      Large

      Description

      MathJax will not render math if this math is inside an itemized list of a cloze question, and there's no math outside the list.

      Please see attached image. I've created a quiz with 4 questions containing basically the same text:

      • 1st one is a description question, with text containing embedded math
      • 2nd one is the malfunctioning cloze question. It has only an itemized list with 2 items, and the second one has an equation. The equation is not rendered.
      • 3rd question is the same as above, but with a text-only paragraph before the list. Same behaviour, even changing the itemized list into a enumerated one.
      • 4th question: Same as 2nd, but embedding an equation into the first paragraph's text. Now the two equations are correctly rendered.

      My system:
      Test Quiz Filter settings are as follows:
      TeX notation OFF (1st place)
      MathJax ON (2nd place)

      The question text of the malfunctioning cloze question is (in HTML format):

      <ul><li>The <b>audio band frequency range </b>is:

      {1:MULTICHOICE:~%0%20Hz-2kHz~%0%2kHz-20kHz~%0%2Hz-20kHz~%100%20Hz-20kHz}

      .</li><li>The<b> capacitor's AC impedance</b> is: ( Z_C(j\omega )= )

      {1:MULTICHOICE:~%0%\(j/(2\pi fC)\)~%100%\(-j/(2\pi fC)\)~%0%\(j2\pi fC\)~%0%\(-j2\pi fC\)}

      .</li></ul>

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/May/15