MDL-72130 courseformat: fix deprecated course_section_cm

This commit is contained in:
Ferran Recio 2021-08-26 10:18:34 +02:00
parent 1464843a25
commit 5672bafcdb

View File

@ -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);
}
/**