diff --git a/blocks/admin_tree/block_admin_tree.php b/blocks/admin_tree/block_admin_tree.php
index 95dd95f4dde..d6ad1b92be8 100644
--- a/blocks/admin_tree/block_admin_tree.php
+++ b/blocks/admin_tree/block_admin_tree.php
@@ -46,23 +46,26 @@ class block_admin_tree extends block_base {
$this->tempcontent .= "\n";
}
- function create_item($visiblename,$link,$icon) {
+ function create_item($visiblename,$link,$icon,$class) {
global $CFG;
for ($i = 0; $i < $this->currentdepth; $i++) {
$this->tempcontent .= " ";
}
- $this->tempcontent .= '
' . $visiblename . '
' . "\n";
+ $this->tempcontent .= '
'.
+ $visiblename.'
'."\n";
}
function build_tree (&$content) {
global $CFG;
if (is_a($content, 'admin_settingpage')) {
if ($content->check_access() and !$content->is_hidden()) {
- $this->create_item($content->visiblename,$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=' . $content->name,$CFG->wwwroot .'/blocks/admin_tree/item.gif');
+ $class = ($content->name == $this->section) ? 'link current' : 'link';
+ $this->create_item($content->visiblename,$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=' . $content->name,$CFG->wwwroot .'/blocks/admin_tree/item.gif', $class);
}
} else if (is_a($content, 'admin_externalpage')) {
if ($content->check_access() and !$content->is_hidden()) {
- $this->create_item($content->visiblename, $content->url, $CFG->wwwroot . '/blocks/admin_tree/item.gif');
+ $class = ($content->name == $this->section) ? 'link current' : 'link';
+ $this->create_item($content->visiblename, $content->url, $CFG->wwwroot . '/blocks/admin_tree/item.gif', $class);
}
} else if (is_a($content, 'admin_category')) {
if ($content->check_access() and !$content->is_hidden()) {
@@ -93,7 +96,7 @@ class block_admin_tree extends block_base {
global $CFG, $ADMIN;
- require_once($CFG->libdir.'/adminlib.php');
+ require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
if ($this->content !== NULL) {
diff --git a/theme/standard/styles_color.css b/theme/standard/styles_color.css
index 78f7197be58..7a5455c6920 100644
--- a/theme/standard/styles_color.css
+++ b/theme/standard/styles_color.css
@@ -318,6 +318,10 @@ table.flexible .r1 {
color: #888;
}
+.block_admin_tree.sideblock .link.current {
+ background-color:#EEEEEE;
+}
+
/***
*** Blocks
***/