Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-3032

MathJax issues with local deployment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.5.4
    • Fix Version/s: 11.5.5, 12.1.1
    • Component/s: None
    • Labels:
      None

      Description

      The way OLAT currently loads MathJax produces some problems (especially with 2.7.2). The attached Patch solves these issues for us:

      1. The MathJax library is loaded with a jquery ajax call which does create a script tag as long as the url is on another domain, if it is on the same domain it will use an ajax call and MathJax can't find out its root directory as this depends on the script tag. (In the patch we set the crossDomain parameter of the ajax call to yes, so it always creates a script tag)
      2. The inline configuration of the MathJax library is done in the success callback of the ajax call. This does not seem to work with 2.7.2 (and sould not be done this way since 2.7 according to the docs). In the patch we did instead use the method described in: http://docs.mathjax.org/en/latest/configuration.html#using-plain-javascript
      3. We do have user supplied content in our database that is not valid mathml code, but is rendered with firefox just fine, as soon as mathjax tries to rerender it it will fail and produce error messages. We plan to get rid of that content, but in the meantime we switched the mathjax configuration to not process mathml content. In the attached patch it is now possible to change the hard coded mathjax configuration in the olat.local.properties (the current default being set in olat.properties).

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            d.haag Daniel Haag
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 5 minutes
                1h 5m