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

Improve how core component renderers are being requested.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Incomplete
    • Icon: Minor Minor
    • None
    • 2.5.2
    • Libraries
    • None
    • MOODLE_25_STABLE

      Tim noted while reviewing my work on MDL-42057 that the means by which we request renderers is inconsistent.
      I felt it was a separate issue to mine and have opened this issue to look at it because it is a VERY valid point.

      The following shows the different ways in which we request a core component renderer:

      // To get a core component renderer:
      $PAGE->get_renderer('core', 'course');
      // Or....
      $PAGE->get_renderer('core_course');
      // To get a subtype of it it has to be.
      $PAGE->get_renderer('core_course', 'management');
       
      // To get the lesson renderer:
      $PAGE->get_renderer('mod_lesson');
      // To get a subtype of it it.
      $PAGE->get_renderer('mod_lesson', 'management');
      

      Really we should not allow the first way of getting a core renderer and for the time being show a debugging notice or similar.

            Unassigned Unassigned
            samhemelryk Sam Hemelryk
            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.