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

Overriding a context for a template in a theme overridden renderer only modifies the context for php

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.9.7, 3.0.7, 3.1.3, 3.2
    • JavaScript
    • MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE

      I don't know how to solve this, but a theme is allows to override a render method to change the context before sending it to a mustache template. If it does this, the changed context will only apply when the render_x method is called which means php only.

      If a template is rendered by both php and javascript the themer needs to do one of:
      1. Override the template and gracefully handle either the modified, or the original context.
      2. Find out where the template is used and use a different template for the javascript version.

      It would be best if a theme could change the context in php and have it apply to php and javascript. This is not possible because the function signatures of the webservices are "fixed" - so the modified data returned from a webservice function would trigger an error.

            Unassigned Unassigned
            damyon Damyon Wiese
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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