Skip to content

Commit 36e6725

Browse files
committed
Overwrite subsection menu (MDL-82510) WIP 3
1 parent 672f790 commit 36e6725

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

classes/output/courseformat/content/cm/delegatedcontrolmenu.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,22 @@ protected function get_section_view_item(): ?link {
3737
return null;
3838
}
3939

40+
/**
41+
* Retrieves the edit item for the section control menu.
42+
*
43+
* @return link|null The menu item if applicable, otherwise null.
44+
*/
45+
protected function get_section_edit_item(): ?link {
46+
$link = parent::get_section_edit_item();
47+
48+
if ($link) {
49+
$link->url->remove_params('sr');
50+
$link->url->remove_params('returnurl');
51+
}
52+
53+
return $link;
54+
}
55+
4056
/**
4157
* Retrieves the permalink item for the section control menu.
4258
*

0 commit comments

Comments
 (0)