Commit a3de1eff authored by Sara Arjona's avatar Sara Arjona
Browse files

Merge branch 'MDL-74160-master' of https://github.com/ferranrecio/moodle

parents d5ade9c6 ce7edab8
......@@ -413,6 +413,34 @@ abstract class section_renderer extends core_course_renderer {
return $o;
}
/**
* Generate the starting container html for a list of sections.
*
* @deprecated since 4.0 MDL-72656 - use core_course output components instead.
*
* @return string HTML to output.
*/
protected function start_section_list() {
debugging('start_section_list() is deprecated. Please use ' .
'core_courseformat\\output\\local\\content\\section to render individual sections or .' .
'core_courseformat\\output\\local\\content to render the full course', DEBUG_DEVELOPER);
return html_writer::start_tag('ul', ['class' => 'sections']);
}
/**
* Generate the closing container html for a list of sections.
*
* @deprecated since 4.0 MDL-72656 - use core_course output components instead.y
*
* @return string HTML to output.
*/
protected function end_section_list() {
debugging('end_section_list() is deprecated. Please use ' .
'core_courseformat\\output\\local\\content\\section to render individual sections or .' .
'core_courseformat\\output\\local\\content to render the full course', DEBUG_DEVELOPER);
return html_writer::end_tag('ul');
}
/**
* Old method to print section edit controls. Do not use it!
*
......
......@@ -823,10 +823,8 @@ class core_course_renderer extends plugin_renderer_base {
$mod->get_section_info(),
$mod,
);
$renderer = $format->get_renderer($this->page);
$data = $availability->export_for_template($renderer);
return $data->info ?? '';
return $renderer->render($availability);
}
/**
......
......@@ -56,9 +56,9 @@ renderer and course format renderer:
- course_section_cm_name_title (replaced by core_courseformat\output\local\cm\title)
- course_section_cm_text (integrated in core_courseformat\output\local\content\cm)
- course_section_cm_availability (replaced by core_courseformat\output\local\content\cm\availability))
* The following abstract methods are deleted:
- start_section_list (integrated in core_courseformat\output\local\content)
- end_section_list (integrated in core_courseformat\output\local\content)
* The following abstract methods are deleted:
- page_title (moved to core_courseformat\output\local\content)
* Course formats should have a renderer (until now it was only highly recommended but not mandatory). For backwards
compatibility (to not break third-party plugins without it), legacy_format_renderer has been created and will be used when
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment