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

Theme overriding of core_course_renderer does not work for function course_section_add_cm_control

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.0 regressions
    • None
    • Course
    • HQ 2023 Sprint i1.3 Moppies

    Description

      If I define my version of the function course_section_add_cm_control by overriding in theme_mytheme the core renderer \core_course_renderer and defining the function there, this does not work.

      Analysing the code, it seems to me, that this is due to the fact that this function ist called from the course format renderer (for example topics), which extends section_renderer which in turn extends core_course_renderer itself. In this chain the definition overridden in my theme does not get called.

      It is not obvious to me that I can override in theme directly core_courseformat\output\section_renderer and to override the renderer of EACH course format I would have happily avoided.

      Is this somewhat regression of MDL-71863 or is it simply so?

      Attachments

        Activity

          People

            Unassigned Unassigned
            ManeggiaP Paola Maneggia
            Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated: