MDL-73914 course: move both options to more menu

This commit moves the 'Download course content' and 'Unenrol me from course'
options to more menu.
This commit is contained in:
Simey Lameze 2022-03-21 13:46:42 +08:00
parent b74b47065a
commit 37bf03b2f4
2 changed files with 2 additions and 2 deletions

View File

@ -517,7 +517,7 @@ function enrol_add_course_navigation(navigation_node $coursenode, $course) {
if ($unenrollink = $plugin->get_unenrolself_link($instance)) {
$shortname = format_string($course->shortname, true, array('context' => $coursecontext));
$coursenode->add(get_string('unenrolme', 'core_enrol', $shortname), $unenrollink, navigation_node::TYPE_SETTING, null, 'unenrolself', new pix_icon('i/user', ''));
$coursenode->get('unenrolself')->set_force_into_more_menu();
$coursenode->get('unenrolself')->set_force_into_more_menu(true);
break;
//TODO. deal with multiple unenrol links - not likely case, but still...
}

View File

@ -4743,7 +4743,7 @@ class settings_navigation extends navigation_node {
$coursenode->add($linkattr->displaystring, $actionlink, self::TYPE_SETTING, null, 'download',
new pix_icon('t/download', ''));
$coursenode->get('download')->set_force_into_more_menu();
$coursenode->get('download')->set_force_into_more_menu(true);
}
// Return we are done