mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-72130 courseformat: fix deprecated course_section_cm
This commit is contained in:
parent
1464843a25
commit
5672bafcdb
@ -882,11 +882,12 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
}
|
||||
$section = $modinfo->get_section_info($format->get_section_number());
|
||||
|
||||
$cmclass = $format->get_output_classname('content/cm');
|
||||
$cmclass = $format->get_output_classname('content\\section\\cm');
|
||||
$cm = new $cmclass($format, $section, $mod, $displayoptions);
|
||||
// The course outputs works with format renderers, not with course renderers.
|
||||
$renderer = $format->get_renderer($this->page);
|
||||
return $renderer->render($cm);
|
||||
$data = $cm->export_for_template($renderer);
|
||||
return $this->output->render_from_template('core_courseformat/local/content/cm', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user