navigation MDL-14632 Fixed up user profile navigation and settings after recent changes.

This commit is contained in:
Sam Hemelryk
2010-05-17 05:38:59 +00:00
parent 7928979b96
commit 87c215de67
4 changed files with 65 additions and 29 deletions
+10 -5
View File
@@ -107,12 +107,17 @@ $PAGE->blocks->add_region('content');
$PAGE->set_subpage($currentpage->id);
$PAGE->set_title("$SITE->shortname: $strpublicprofile");
$PAGE->set_heading("$SITE->shortname: $strpublicprofile");
$PAGE->navigation->extend_for_user($user);
if ($node = $PAGE->settingsnav->get('userviewingsettings')) {
$node->forceopen = true;
if ($node = $PAGE->settingsnav->get('root')) {
$node->forceopen = false;
if (!$currentuser) {
$PAGE->navigation->extend_for_user($user);
if ($node = $PAGE->settingsnav->get('userviewingsettings')) {
$node->forceopen = true;
}
} else if ($node = $PAGE->settingsnav->get('usercurrentsettings', navigation_node::TYPE_CONTAINER)) {
$node->forceopen = true;
}
if ($node = $PAGE->settingsnav->get('root')) {
$node->forceopen = false;
}