diff --git a/lib/navigationlib.php b/lib/navigationlib.php index d8de09d3f5f..4048714d5ab 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -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); diff --git a/user/tests/behat/set_default_homepage.feature b/user/tests/behat/set_default_homepage.feature index f07aa1fbac2..53c2ab4a757 100644 --- a/user/tests/behat/set_default_homepage.feature +++ b/user/tests/behat/set_default_homepage.feature @@ -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 "" And I press "Save changes"