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

Atto equation editor loading problems with mulitple expressions in a text

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.7
    • Component/s: HTML Editor (Atto)
    • Labels:
    • Testing Instructions:
      Hide

      These testing instructions assume that you have one of the TeX filters (either TeX or MathJax) enabled and configured correctly

      1. Open an Atto editor (I typically use the forums)
      2. Open the equation editor and create an equation, Insert it
      3. Confirm that it was inserted with delimiters as per the example below:

        \( x*y \)
        

      4. Place the caret outside of the equation (both before and after)
      5. Confirm that the equation editor button is not highlighted
      6. Place the caret inside the equation (anywhere from the first character of the delimiter to the last)
        • Confirm that the equation editor button is highlighted
        • Check the entire length of the equation
      7. Press the HTML button in the editor and replace all of the content with:

        <p>
        This is an example of several equations in a string and on the same line. We have some which are the same: $$x = y + 1$$ is the same as $$x = y + 1$$. Some which are different like this one: $$x = y + 2$$. Some which use each of the different delimiters: \(x = y + 1\) same: \(x = y + 1\) different: \(x = y + 2\). Square braces: \[x = y + 1\] same: \[x = y + 1\] different: \[x = y + 2\]; and tex: [tex]x = y + 1[/tex] same: [tex]x = y + 1[/tex] different: [tex]x = y + 2[/tex]. Here's an equation which has a common letter which is also used in this statement. $$x$$, and another copy of it $$x$$. And finally some equations which spans multiple lines in the HTML: $$x = 
        y + 5$$
        \(x = 
        y + 5\)
        \[x = 
        y + 5\]
        [tex]x = 
        y + 5[/tex]
        </p>
        <p>
        And here is another match for you to play with: $$ equation $ still equation $ still $ still $$ not $$ new $ $ $$
        </p>
        

      8. For each of the above delimeters:
        • Place the caret between two equations and confirm that the button is not highlighted
        • Select the second of the 'same' equations and update it to read x = y + 3, and save it confirming that the correct equation was updated
        • Select the final equation (x = y + 2), update it to read x = y + 4 and save it confirming that the correct equation was updated
        • Select the equations spanning multiple lines:
          • Confirm that the equation editor button is highlighted for them as before
          • Confirm that opening the equation editor shows the string correctly with it's newline in the middle
          • Confirm that updating it with a new value (add an additional new line, change the 5 to a 6) keeps the equation correct in the HTML source (with it's new lines) (Note, it will appear on a single line in the WYSIWGNG view)
      9. See if there's anything else you can think of...
      Show
      These testing instructions assume that you have one of the TeX filters (either TeX or MathJax) enabled and configured correctly Open an Atto editor (I typically use the forums) Open the equation editor and create an equation, Insert it Confirm that it was inserted with delimiters as per the example below : \( x*y \) Place the caret outside of the equation (both before and after) Confirm that the equation editor button is not highlighted Place the caret inside the equation (anywhere from the first character of the delimiter to the last) Confirm that the equation editor button is highlighted Check the entire length of the equation Press the HTML button in the editor and replace all of the content with: <p> This is an example of several equations in a string and on the same line. We have some which are the same: $$x = y + 1$$ is the same as $$x = y + 1$$. Some which are different like this one: $$x = y + 2$$. Some which use each of the different delimiters: \(x = y + 1\) same: \(x = y + 1\) different: \(x = y + 2\). Square braces: \[x = y + 1\] same: \[x = y + 1\] different: \[x = y + 2\]; and tex: [tex]x = y + 1[/tex] same: [tex]x = y + 1[/tex] different: [tex]x = y + 2[/tex]. Here's an equation which has a common letter which is also used in this statement. $$x$$, and another copy of it $$x$$. And finally some equations which spans multiple lines in the HTML: $$x = y + 5$$ \(x = y + 5\) \[x = y + 5\] [tex]x = y + 5[/tex] </p> <p> And here is another match for you to play with: $$ equation $ still equation $ still $ still $$ not $$ new $ $ $$ </p> For each of the above delimeters: Place the caret between two equations and confirm that the button is not highlighted Select the second of the 'same' equations and update it to read x = y + 3, and save it confirming that the correct equation was updated Select the final equation (x = y + 2), update it to read x = y + 4 and save it confirming that the correct equation was updated Select the equations spanning multiple lines: Confirm that the equation editor button is highlighted for them as before Confirm that opening the equation editor shows the string correctly with it's newline in the middle Confirm that updating it with a new value (add an additional new line, change the 5 to a 6) keeps the equation correct in the HTML source (with it's new lines) (Note, it will appear on a single line in the WYSIWGNG view) See if there's anything else you can think of...
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-45207-master

      Description

      The Atto equation editor looks for delimited TeX in the edit buffer of Atto when it starts and loads it. If there are multiple equations, it grabs everything between the first and last delimiter including intervening text. It should take only one equation.

        Attachments

        1. image.png
          image.png
          41 kB
        2. longtext.png
          longtext.png
          63 kB

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dthies Daniel Thies
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Marina Glancy
              Tester:
              John Okely
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14