navigation MDL-25410 Fixed up marking of active item/items and fixed blog links on...
authorSam Hemelryk <sam@moodle.com>
Fri, 26 Nov 2010 06:04:59 +0000 (06:04 +0000)
committerSam Hemelryk <sam@moodle.com>
Fri, 26 Nov 2010 06:04:59 +0000 (06:04 +0000)
blocks/navigation/styles.css
blocks/settings/styles.css
lib/navigationlib.php

index d9a1a4d..c6aecd3 100644 (file)
@@ -13,7 +13,7 @@
 .block_navigation .block_tree .type_activity > .tree_item.branch {background-image:none;position:relative;}
 .block_navigation .block_tree .type_activity > .tree_item.branch img {position:absolute;left:0;}
 .block_navigation .block_tree .root_node.leaf {padding-left:0px;}
-.block_navigation .block_tree .current_branch {font-weight:bold;}
+.block_navigation .block_tree .active_tree_node {font-weight:bold;}
 .block_navigation .block_tree .depth_1.current_branch ul {font-weight:normal;}
 
 .jsenabled .block_navigation .block_tree .tree_item.branch {cursor:pointer;}
index 50a2f4b..abe00c5 100644 (file)
@@ -15,7 +15,7 @@
 
 .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 .current_branch {font-weight:bold;}
+.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;}
 .jsenabled .block_settings .block_tree .collapsed ul {display: none;}
index e6857e4..4a407e0 100644 (file)
@@ -3440,7 +3440,7 @@ class settings_navigation extends navigation_node {
         }
 
         // Blogs
-        if (!empty($CFG->bloglevel)) {
+        if ($currentuser && !empty($CFG->bloglevel)) {
             $blog = $usersetting->add(get_string('blogs', 'blog'), null, navigation_node::TYPE_CONTAINER, null, 'blogs');
             $blog->add(get_string('preferences', 'blog'), new moodle_url('/blog/preferences.php'), navigation_node::TYPE_SETTING);
             if (!empty($CFG->useexternalblogs) && $CFG->maxexternalblogsperuser > 0 && has_capability('moodle/blog:manageexternal', get_context_instance(CONTEXT_SYSTEM))) {