MDL-73233 navigation: Breadcrumbs removed from user preferences

In MDL-74087 breadcrumbs were removed from the User preferences page.
This patch re-introduces a piece of code that was removed originally
in MDL-73233 while reviewing all the places where the Dashboard was
displayed by default (to avoid inconsistencies). New item in primary
navigation has been changed to "Home" but we still need the code
re-added to hide breadcrumbs when its content matches the primary
navigation.
This commit is contained in:
Sara Arjona
2022-03-18 07:44:55 +01:00
parent cd2225a71b
commit 30b75b7190
2 changed files with 4 additions and 1 deletions
+4
View File
@@ -5029,6 +5029,10 @@ class settings_navigation extends navigation_node {
// This should be set to false as we don't want to show this to the user. It's only for generating the correct
// breadcrumb.
$mainpage->display = false;
$homepage = get_home_page();
if (($homepage == HOMEPAGE_MY || $homepage == HOMEPAGE_MYCOURSES)) {
$mainpage->mainnavonly = true;
}
$iscurrentuser = ($user->id == $USER->id);
@@ -62,7 +62,6 @@ Feature: Set the site home page and dashboard as the default home page
And I log out
When I log in as "user1"
And I follow "Preferences" in the user menu
And I should see "Home" in the ".breadcrumb" "css_element"
And I follow "Start page"
And I set the field "Start page" to "<preference>"
And I press "Save changes"