Merge branch 'MDL-74298-master' of https://github.com/peterRd/moodle

This commit is contained in:
Sara Arjona 2022-04-01 17:38:26 +02:00
commit ec19f9f8cd
2 changed files with 17 additions and 4 deletions

View File

@ -11,7 +11,10 @@ $query = trim(optional_param('query', '', PARAM_NOTAGS)); // Search string
$context = context_system::instance();
$PAGE->set_context($context);
$PAGE->set_secondary_navigation(true, true);
// If we are performing a search we need to display the secondary navigation with links as opposed to just anchors.
// NOTE: hassecondarynavigation will be overridden in classic.
$PAGE->set_secondary_navigation(true, !$query);
$hassiteconfig = has_capability('moodle/site:config', $context);

View File

@ -1,8 +1,7 @@
@javascript @theme_boost
Feature: Administration nav tabs back
When returning to the Administration page I want to see my last opened tab
Feature: Administration nav tabs
Scenario: See last opened tab in site admin
Scenario: See last opened tab in site admin when returning to the page
Given I log in as "admin"
And I am on site homepage
And I click on "Site administration" "link"
@ -11,3 +10,14 @@ Feature: Administration nav tabs back
And I should see "New filter"
When I press the "back" button in the browser
Then I should see "Cohorts"
Scenario: Navigate back to specific tab after search
Given I log in as "admin"
And I am on site homepage
And I click on "Site administration" "link"
And I set the field "Search" to "assignment"
And I press "Search"
# I should be redirected to the site admin tab with the complete list under it.
# Testing the existence of at least one of the options in the node is sufficient.
When I select "Users" from secondary navigation
Then I should see "Browse list of users"