Merge branch 'MDL-81335-main' of https://github.com/aanabit/moodle

This commit is contained in:
Ilya Tregubov
2024-03-28 09:10:57 +08:00
+4 -2
View File
@@ -146,8 +146,10 @@ if (!empty($bulkbutton)) {
if ($format->show_editor()) {
$sectionclass = new \core_courseformat\output\local\content\section($format, $sectioninfo);
$renderable = $sectionclass->export_for_template($renderer);
$controlmenuhtml = $renderable->controlmenu->menu;
$PAGE->add_header_action($controlmenuhtml);
if (property_exists($renderable->controlmenu, 'menu')) {
$controlmenuhtml = $renderable->controlmenu->menu;
$PAGE->add_header_action($controlmenuhtml);
}
$sectionheading = $OUTPUT->container(
$OUTPUT->render($format->inplace_editable_render_section_name($sectioninfo, false)),
attributes: ['data-for' => 'section_title'],