mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-49667 navigation: allow items without branches in the settings menu
also remove the code that adds a "return to XXX user" link that was supposed to be removed in MDL-23911 , otherwise the link would become visible after the bug fix (but not functional).
This commit is contained in:
parent
f1a415ea70
commit
034fed3edc
@ -14,7 +14,6 @@
|
||||
.block_settings .block_tree .tree_item {padding-left: 21px;margin:3px 0px;text-align:left;}
|
||||
|
||||
.block_settings .block_tree .tree_item.branch {background-image: url([[pix:t/expanded]]);background-position: 0 10%;background-repeat: no-repeat;}
|
||||
.block_settings .block_tree .root_node.leaf {padding-left:0px;}
|
||||
.block_settings .block_tree .active_tree_node {font-weight:bold;}
|
||||
.jsenabled .block_settings .block_tree .tree_item.branch {cursor:pointer;}
|
||||
.jsenabled .block_settings .block_tree .tree_item.emptybranch {background-image: url([[pix:t/collapsed_empty]]);background-position: 0 10%;background-repeat: no-repeat;}
|
||||
@ -29,7 +28,6 @@
|
||||
.dir-rtl .block_settings .block_tree li ul {padding-left:0;padding-right: 18px;}
|
||||
.dir-rtl .block_settings .block_tree .tree_item {padding-right: 21px; padding-left: 0; text-align:right;}
|
||||
.dir-rtl .block_settings .block_tree .tree_item.branch {background-position: center right;}
|
||||
.dir-rtl .block_settings .block_tree .root_node.leaf {padding-right:0px;}
|
||||
.dir-rtl .block_settings .block_tree li.item_with_icon > p img { right: 0; left: auto;}
|
||||
.jsenabled .block_settings .block_tree .tree_item.branch.loadingbranch {background-image:url([[pix:i/loading_small]]);}
|
||||
|
||||
|
@ -3516,20 +3516,11 @@ class settings_navigation extends navigation_node {
|
||||
$usersettings->force_open();
|
||||
}
|
||||
|
||||
// Check if the user is currently logged in as another user
|
||||
if (\core\session\manager::is_loggedinas()) {
|
||||
// Get the actual user, we need this so we can display an informative return link
|
||||
$realuser = \core\session\manager::get_realuser();
|
||||
// Add the informative return to original user link
|
||||
$url = new moodle_url('/course/loginas.php',array('id'=>$this->page->course->id, 'return'=>1,'sesskey'=>sesskey()));
|
||||
$this->add(get_string('returntooriginaluser', 'moodle', fullname($realuser, true)), $url, self::TYPE_SETTING, null, null, new pix_icon('t/left', ''));
|
||||
}
|
||||
|
||||
// At this point we give any local plugins the ability to extend/tinker with the navigation settings.
|
||||
$this->load_local_plugin_settings();
|
||||
|
||||
foreach ($this->children as $key=>$node) {
|
||||
if ($node->nodetype != self::NODETYPE_BRANCH || $node->children->count()===0) {
|
||||
if ($node->nodetype == self::NODETYPE_BRANCH && $node->children->count() == 0) {
|
||||
// Site administration is shown as link.
|
||||
if (!empty($SESSION->load_navigation_admin) && ($node->type === self::TYPE_SITE_ADMIN)) {
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user