diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 4048714d5ab..9bb60f9eae7 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -3045,6 +3045,7 @@ class global_navigation extends navigation_node { self::TYPE_SETTING, null, 'privatefiles', new pix_icon('i/privatefiles', '')); $node->display = false; $node->showinflatnavigation = true; + $node->mainnavonly = true; } } diff --git a/theme/boost/tests/behat/breadcrumb.feature b/theme/boost/tests/behat/breadcrumb.feature index 2ec398e2db2..e9fabb3ba99 100644 --- a/theme/boost/tests/behat/breadcrumb.feature +++ b/theme/boost/tests/behat/breadcrumb.feature @@ -45,7 +45,7 @@ Feature: Breadcrumbs navigation And I should see "Cat 1" in the ".breadcrumb" "css_element" And I should see "Manage courses and categories" in the ".breadcrumb" "css_element" - Scenario: Admin user sets the default home page to 'Site' and navigates to its 'Preferences' page + Scenario: Admin user sets the default home page to 'Site' and navigates to its 'Preferences' and 'Private files' page Given the following config values are set as admin: | defaulthomepage | 0 | And I log in as "admin" @@ -53,26 +53,35 @@ Feature: Breadcrumbs navigation # There should be no breadcrumbs on this page. Then ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" - Scenario: Admin user sets the default home page to 'Dashboard' and navigates to its 'Preferences' page + Scenario: Admin user sets the default home page to 'Dashboard' and navigates to its 'Preferences' and 'Private files' page Given the following config values are set as admin: | defaulthomepage | 1 | And I log in as "admin" When I follow "Preferences" in the user menu # There should be no breadcrumbs on this page. Then ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" + And I follow "Private files" in the user menu + # There should be no breadcrumbs on this page. + And ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" - Scenario: Admin user sets the default home page to 'User preference' and navigates to its 'Preferences' page + Scenario: Admin user sets the default home page to 'User preference' and navigates to its 'Preferences' and 'Private files' page Given the following config values are set as admin: | defaulthomepage | 2 | And I log in as "admin" When I follow "Preferences" in the user menu # There should be no breadcrumbs on this page. Then ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" + And I follow "Private files" in the user menu + # There should be no breadcrumbs on this page. + And ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" - Scenario: Admin user sets the default home page to 'My courses' and navigates to its 'Preferences' page + Scenario: Admin user sets the default home page to 'My courses' and navigates to its 'Preferences' and 'Private files' page Given the following config values are set as admin: | defaulthomepage | 3 | And I log in as "admin" When I follow "Preferences" in the user menu # There should be no breadcrumbs on this page. Then ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" + And I follow "Private files" in the user menu + # There should be no breadcrumbs on this page. + And ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element"