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

Mathjax filter does not respect enabled/disabled state

XMLWordPrintable

    • MOODLE_500_STABLE

      The Mathjax filter does not respect if it is enabled or disabled on the current context. It will always apply.

      To reproduce (for example on 5.0 moodle on sandbox.moodledemo.net):

      • Create a course
      • Enable edit mode
      • Add a "page" activity for example
      • Add some example content to the content field, for example:

        mathjax example content: inline \( \frac{5}{3} \) and display style: $$ \frac{5}{3} $$
        

      • Save and view, formulas should be rendered by mathjax
      • Then go to "Filters" and disable Mathjax filter
      • Open page again, here's the bug: Formulas should not be rendered, but they are

      I digged a bit further and the reason is that core_filters\text_filter::setup is ALWAYS being called, no matter if the filter actually is active in the context. In the overwritten method filter_mathjaxloader\text_filter::setup however the mathjax javascript is already being loaded and run.

      Actually I'm not completely sure if this is a mathjax issue and the setup method is being implemented in a wrong way or if the setup method should not be called for all filters if they are disabled on a context.

            Unassigned Unassigned
            phmemmel PhMemmel
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.