Moodle
  1. Moodle
  2. MDL-33616

TeX filter should work with a parameter --halt-on-error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.4
    • Component/s: Maths filters
    • Labels:
    • Testing Instructions:
      Hide

      Prerequisite

      1. Install latex, dvips and convert libraries
        On ubuntu use
        sudo apt-get install texlive-full (This will install all packages in LaTeX distribution)
      1. Login as admin
      2. Enable tex filter (Settings -> Site administration -> Plugins -> Filters -> Manage filters)
      3. Click settings (next to tex filter) and make sure libraries point to right path
      4. Create a label in course paste "$$ \sqrt {x + y}

        $$" or refer http://docs.moodle.org/22/en/Using_TeX_Notation_2 for other tex symbols

      5. Save and return to course
      6. Make sure you can see square-root x + y image.
      Show
      Prerequisite Install latex, dvips and convert libraries On ubuntu use sudo apt-get install texlive-full (This will install all packages in LaTeX distribution) Login as admin Enable tex filter (Settings -> Site administration -> Plugins -> Filters -> Manage filters) Click settings (next to tex filter) and make sure libraries point to right path Create a label in course paste "$$ \sqrt {x + y} $$" or refer http://docs.moodle.org/22/en/Using_TeX_Notation_2 for other tex symbols Save and return to course Make sure you can see square-root x + y image.
    • Workaround:
      Hide

      Add the --halt-on-error parameter after --interaction=nonstopmode on line 111 of /filter/tex/latex.php and on line 247 of /filter/tex/texdebug.php.

      Show
      Add the --halt-on-error parameter after --interaction=nonstopmode on line 111 of /filter/tex/latex.php and on line 247 of /filter/tex/texdebug.php.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      wip-mdl-33616
    • Rank:
      41558

      Description

      My provider tells me that some mistakes in the TeX code in one course result massive server activity. The TeX plugin calls the LaTeX functions with a parameter --interaction=nonstopmode so an error would not stop the execution of the function and the user does not get a message about his mistake. I don't know if this writing is totally correct. My provider wants to disallow the TeX filter because the TeX filter seems to be a security leak.

      The provider says that the TeX filter should work with a parameter --halt-on-error when it calls the LaTeX system functions.

      Please tell me what I should do!

      Ralf

      1. tex.patch
        1 kB
        Michael de Raadt
      1. latex-setting.png
        90 kB

        Issue Links

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: