Merge branch 'wip-MDL-49667-master' of git://github.com/marinaglancy/moodle

This commit is contained in:
Andrew Nicols 2015-06-16 10:49:40 +08:00 committed by Eloy Lafuente (stronk7)
commit 670befcc0b
2 changed files with 1 additions and 12 deletions

View File

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

View File

@ -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;