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

Algebra debug page is not usable

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Using a server with a working mimetex binary

      1. Enable both Algebra and TeX filters
      2. In TeX notation settings set latex and mimetex binaries to nonexistant file names so Algebra image generation fails
      3. Create algebra expression in profile, course or forum (e.g. @@ 1/2x @@).
      4. Create another one which is invalid algebra code (e.g. @@ x+) @@)
      5. Verify that algebra is converted to link with TeX code (e.g. \frac {1} {2}

        \,x)

      6. Invalid example should display syntax error
      7. As non admin user click link and verify popup with TeX code appears
      8. As admin user click link to open algebra debug script
      9. Type the invalid algebra example used above into the box
      10. Click Show Cache button and verify that information in cache is displayed
      11. Click Delete Cache and Show Cache again and verify it is deleted.
      12. Click both First and Second TeX Translation buttons to show TeX code
      13. Click Show image to display mimetexnotexecutable error
      14. Correct TeX notation setting for mimetex
      15. Reload Show image to display and verify the image is displayed (if not check texdebug.php to verify mimetex is working)
      16. Log out in another browser window and verify attempt an action results in session key error
      17. Click link and verify popup with TeX code appears for both admin and non admin users.
      18. Go back to filter/algebradebug.php script and verify that non admin gets error and admin sees debug script.
      19. Type in expression and verify buttons all work and that image is now displayed.
      20. Create and invalid TeX expression and save e.g.

         

        $$\blah$${code}

      21. View as non admin. Code with link should be displayed. Link should display popup with TeX code.
      22. View as admin. Clicking code link should open debug page.
      23. Test all actions
      24. Logoff in separate window and verify action result in sesskey error.
      Show
      Using a server with a working mimetex binary Enable both Algebra and TeX filters In TeX notation settings set latex and mimetex binaries to nonexistant file names so Algebra image generation fails Create algebra expression in profile, course or forum (e.g. @@ 1/2x @@). Create another one which is invalid algebra code (e.g. @@ x+) @@) Verify that algebra is converted to link with TeX code (e.g. \frac {1} {2} \,x) Invalid example should display syntax error As non admin user click link and verify popup with TeX code appears As admin user click link to open algebra debug script Type the invalid algebra example used above into the box Click Show Cache button and verify that information in cache is displayed Click Delete Cache and Show Cache again and verify it is deleted. Click both First and Second TeX Translation buttons to show TeX code Click Show image to display mimetexnotexecutable error Correct TeX notation setting for mimetex Reload Show image to display and verify the image is displayed (if not check texdebug.php to verify mimetex is working) Log out in another browser window and verify attempt an action results in session key error Click link and verify popup with TeX code appears for both admin and non admin users. Go back to filter/algebradebug.php script and verify that non admin gets error and admin sees debug script. Type in expression and verify buttons all work and that image is now displayed. Create and invalid TeX expression and save e.g.   $$\blah$${code} View as non admin. Code with link should be displayed. Link should display popup with TeX code. View as admin. Clicking code link should open debug page. Test all actions Logoff in separate window and verify action result in sesskey error.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-48213-master

      Description

      1. Log in as admin
      2. Enable the Algrebra filter
      3. Edit your profile and the following to your description

        @@ 1/2x @@
        

      4. View your profile and click on the formula

      Expected

      • You get access to the debug page

      Actual

      • You are redirected to the login page

      Important: Add a check for sesskey or this will be prone to XSRF.

        Attachments

          Activity

            People

            • Assignee:
              dthies Daniel Thies
              Reporter:
              fred Frédéric Massart
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Dan Poltawski
              Tester:
              Dan Poltawski
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Jan/15