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

Review usage of get_renderer

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.2.2
    • None
    • Themes
    • MOODLE_32_STABLE
    • Easy

    Description

      While working on MDL-57510. I realized that -
      If I create \theme_boost\output\core_question_renderer, everything works as expected. But \theme_boost\output\core\question_renderer doesn't work (default renderer gets called instead)

      This was happening because I was calling $PAGE->get_renderer("core_question") instead of get_renderer("core", "question")
      Look at lib/outputfactories.php, theme_overridden_renderer_factory, to know why it makes a difference.

      Upon looking at other usages I found that core_message is used both ways in core. All usages needs to be made consistent and properly documented to avoid issues like this for themers.

      Cheers

      Attachments

        Activity

          People

            Unassigned Unassigned
            ankit_frenz Ankit Agarwal
            Huong Nguyen, Bas Brands, Mathew May
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: