- {{#urlselect}}
+ {{#navigation}}
- {{> core/url_select }}
+ {{> core/tertiary_navigation_selector}}
- {{/urlselect}}
+ {{/navigation}}
{{#renderedcontent}}
{{{renderedcontent}}}
diff --git a/course/tests/behat/category_management.feature b/course/tests/behat/category_management.feature
index ee8845ba1a4..b1565edffa4 100644
--- a/course/tests/behat/category_management.feature
+++ b/course/tests/behat/category_management.feature
@@ -235,6 +235,7 @@ Feature: Test category management actions
And "Move into" "select" should not be visible
And I press "Cancel"
+ @javascript
Scenario: Test I can assign roles for a category through the management interface.
Given the following "categories" exist:
| name | category | idnumber |
@@ -246,7 +247,7 @@ Feature: Test category management actions
And I go to the courses management page
And I should see the "Course categories and courses" management page
And I click on "permissions" action for "Cat 1" in management category listing
- And I select "Assign roles" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Assign roles"
# Redirect
And I should see "Assign roles in Category: Cat 1"
And I should see "Please choose a role to assign"
diff --git a/course/tests/behat/course_category_breadcrumbs.feature b/course/tests/behat/course_category_breadcrumbs.feature
index 0dcea9c90da..b99311cec81 100644
--- a/course/tests/behat/course_category_breadcrumbs.feature
+++ b/course/tests/behat/course_category_breadcrumbs.feature
@@ -135,7 +135,7 @@ Feature: Course category breadcrumbs navigation
And I navigate to "Courses > Manage courses and categories" in site administration
And I follow "Cat 1"
And I navigate to "Permissions" in current page administration
- When I select "Assign roles" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Assign roles"
Then I should see "Courses" in the ".breadcrumb" "css_element"
And I should see "Cat 1" in the ".breadcrumb" "css_element"
And I should see "Assign roles" in the ".breadcrumb" "css_element"
@@ -147,7 +147,7 @@ Feature: Course category breadcrumbs navigation
And I navigate to "Courses > Manage courses and categories" in site administration
And I follow "Cat 1"
And I navigate to "Permissions" in current page administration
- When I select "Check permissions" from the "jump" singleselect
+ When I set the field "Participants tertiary navigation" to "Check permissions"
Then I should see "Courses" in the ".breadcrumb" "css_element"
And I should see "Cat 1" in the ".breadcrumb" "css_element"
And I should see "Check permissions" in the ".breadcrumb" "css_element"
diff --git a/enrol/cohort/tests/behat/enrolcohorts.feature b/enrol/cohort/tests/behat/enrolcohorts.feature
index 2af38b53570..2571dc52cbe 100644
--- a/enrol/cohort/tests/behat/enrolcohorts.feature
+++ b/enrol/cohort/tests/behat/enrolcohorts.feature
@@ -58,7 +58,7 @@ Feature: Cohort enrolment management
| Cohort | A1 |
| customint2 | -1 |
Then I should see "Cohort sync (Alpha1 - Student)"
- And I select "Groups" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Groups"
# Confirm that group was created and corresponding group members are present
And I set the field "groups[]" to "Alpha1 cohort (2)"
And the "members" select box should contain "Sandra Cole (s1@example.com)"
@@ -106,7 +106,7 @@ Feature: Cohort enrolment management
And I click on "Edit" "link" in the "Beta2" "table_row"
And I set the field "Add to group" to "Create new group"
And I click on "Save changes" "button"
- And I select "Groups" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Groups"
And I set the field "groups[]" to "Beta2 cohort (2)"
Then the "members" select box should contain "Bianca McAfee (s3@example.com)"
And the "members" select box should contain "Abigail Wyatt (s5@example.com)"
diff --git a/enrol/instances.php b/enrol/instances.php
index abbed7a3568..dc6103087a4 100644
--- a/enrol/instances.php
+++ b/enrol/instances.php
@@ -202,7 +202,6 @@ if ($canconfig and $action and confirm_sesskey()) {
echo $OUTPUT->header();
echo $OUTPUT->render_participants_tertiary_nav($course);
-echo $OUTPUT->heading(get_string('enrolmentinstances', 'enrol'));
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthnormal');
diff --git a/enrol/renameroles.php b/enrol/renameroles.php
index 7181d368175..5c62c75baff 100644
--- a/enrol/renameroles.php
+++ b/enrol/renameroles.php
@@ -48,7 +48,6 @@ $PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->render_participants_tertiary_nav($course);
-echo $OUTPUT->heading(get_string('rolerenaming'));
echo $OUTPUT->paragraph(get_string('rolerenaming_help'));
diff --git a/group/groupings.php b/group/groupings.php
index a03eeb6fa64..713bb450985 100644
--- a/group/groupings.php
+++ b/group/groupings.php
@@ -57,10 +57,9 @@ $PAGE->navbar->add($strgroupings);
$PAGE->set_title($strgroupings);
$PAGE->set_heading($course->fullname);
$PAGE->set_pagelayout('standard');
-echo $OUTPUT->header();
+echo $OUTPUT->header();
echo $OUTPUT->render_participants_tertiary_nav($course);
-echo $OUTPUT->heading($strgroupings);
$data = array();
if ($groupings = $DB->get_records('groupings', array('courseid'=>$course->id), 'name')) {
diff --git a/group/index.php b/group/index.php
index ba7d45c1e8a..94bc4b13c25 100644
--- a/group/index.php
+++ b/group/index.php
@@ -183,7 +183,6 @@ $PAGE->set_pagelayout('standard');
echo $OUTPUT->header();
echo $OUTPUT->render_participants_tertiary_nav($course);
-echo $OUTPUT->heading(format_string($course->shortname, true, array('context' => $context)) .' '.$strgroups, 3);
$groups = groups_get_all_groups($courseid);
$selectedname = null;
diff --git a/group/overview.php b/group/overview.php
index 02b53f6b0a8..006c3772df6 100644
--- a/group/overview.php
+++ b/group/overview.php
@@ -273,11 +273,9 @@ $PAGE->navbar->add(get_string('overview', 'group'));
$PAGE->set_title($strgroups);
$PAGE->set_heading($course->fullname);
$PAGE->set_pagelayout('standard');
-echo $OUTPUT->header();
+echo $OUTPUT->header();
echo $OUTPUT->render_participants_tertiary_nav($course);
-/// Print overview
-echo $OUTPUT->heading(format_string($course->shortname, true, array('context' => $context)) .' '.$stroverview, 3);
echo $strfiltergroups;
diff --git a/group/tests/behat/auto_creation.feature b/group/tests/behat/auto_creation.feature
index b1523c5467c..118666df016 100644
--- a/group/tests/behat/auto_creation.feature
+++ b/group/tests/behat/auto_creation.feature
@@ -66,7 +66,7 @@ Feature: Automatic creation of groups
And I should see "No" in the "Group messaging" "select"
And I press "Cancel"
# Check groupings.
- And I select "Groupings" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Groupings"
And I should see "Grouping name"
And I click on "Show groups in grouping" "link" in the "Grouping name" "table_row"
And the "removeselect" select box should contain "Group A"
diff --git a/group/tests/behat/bulk_messaging.feature b/group/tests/behat/bulk_messaging.feature
index 536655ef131..8dd5031d6b6 100644
--- a/group/tests/behat/bulk_messaging.feature
+++ b/group/tests/behat/bulk_messaging.feature
@@ -14,19 +14,11 @@ Feature: Bulk update group messaging status
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
- And I log in as "teacher1"
- And I am on the "Course 1" "groups" page
- And I press "Create group"
- And I set the following fields to these values:
- | Group name | Group-A-Test |
- | Group ID number | Group-A-Test |
- And I press "Save changes"
- And I press "Create group"
- And I set the following fields to these values:
- | Group name | Group-B-Test |
- | Group ID number | Group-B-Test |
- And I press "Save changes"
- And I select "Groups" from the "jump" singleselect
+ And the following "groups" exist:
+ | course | name | idnumber |
+ | C1 | Group-A-Test | GA |
+ | C1 | Group-B-Test | GB |
+ And I am on the "Course 1" "groups" page logged in as "teacher1"
@javascript
Scenario: Bulk enable messaging in groups
diff --git a/group/tests/behat/create_groups.feature b/group/tests/behat/create_groups.feature
index c9da9840fad..efa13e09e1c 100644
--- a/group/tests/behat/create_groups.feature
+++ b/group/tests/behat/create_groups.feature
@@ -110,7 +110,7 @@ Feature: Organize students into groups
| Group name | The greatest group that never existed |
And I press "Save changes"
And I should see "The greatest group that never existed"
- And I select "Groupings" from the "jump" singleselect
+ And I am on the "Course 1" "groupings" page
And I press "Create grouping"
And the "idnumber" "field" should be readonly
And I set the following fields to these values:
diff --git a/group/tests/behat/custom_fields.feature b/group/tests/behat/custom_fields.feature
index 25c8e407f61..9512cf01949 100644
--- a/group/tests/behat/custom_fields.feature
+++ b/group/tests/behat/custom_fields.feature
@@ -34,12 +34,12 @@ Feature: Custom profile fields in groups
And I am on the "Course 1" "groups" page
# Check the Overview page.
- And I select "Overview" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Overview"
And "Robin Hood (user1, fox)" "text" should exist in the "Canines" "table_row"
And "Little John (user2, bear)" "text" should exist in the "No group" "table_row"
# Check the groups page.
- And I select "Groups" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Groups"
And I set the field "groups" to "Canines"
And I should see "Robin Hood (user1, fox)"
And I should not see "Little John (user2, bear)"
diff --git a/group/tests/behat/delete_groups.feature b/group/tests/behat/delete_groups.feature
index 1ce1bc7489b..f2d9526c1c6 100644
--- a/group/tests/behat/delete_groups.feature
+++ b/group/tests/behat/delete_groups.feature
@@ -14,28 +14,16 @@ Feature: Automatic deletion of groups and groupings
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
+ And the following "groups" exist:
+ | course | name | idnumber |
+ | C1 | Group (without ID) | |
+ | C1 | Group (with ID) | An ID |
+ And the following "groupings" exist:
+ | course | name | idnumber |
+ | C1 | Grouping (without ID) | |
+ | C1 | Grouping (with ID) | An ID |
And I log in as "teacher1"
- And I am on the "Course 1" "groups" page
- And I press "Create group"
- And I set the following fields to these values:
- | Group name | Group (without ID) |
- And I press "Save changes"
- And I press "Create group"
- And I set the following fields to these values:
- | Group name | Group (with ID) |
- | Group ID number | An ID |
- And I press "Save changes"
- And I select "Groupings" from the "jump" singleselect
- And I press "Create grouping"
- And I set the following fields to these values:
- | Grouping name | Grouping (without ID) |
- And I press "Save changes"
- And I press "Create grouping"
- And I set the following fields to these values:
- | Grouping name | Grouping (with ID) |
- | Grouping ID number | An ID |
- And I press "Save changes"
- And I select "Groups" from the "jump" singleselect
+ And I am on the "Course 1" "groups" page logged in as "teacher1"
@javascript
Scenario: Delete groups and groupings with and without ID numbers
@@ -47,7 +35,7 @@ Feature: Automatic deletion of groups and groupings
And I press "Delete"
And I press "Yes"
And the "groups" select box should not contain "Group (with ID) (0)"
- And I select "Groupings" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Groupings"
And I click on "Delete" "link" in the "Grouping (without ID)" "table_row"
And I press "Yes"
And I should not see "Grouping (without ID)"
@@ -67,7 +55,7 @@ Feature: Automatic deletion of groups and groupings
And I press "Delete"
And I press "Yes"
And I should not see "Group (without ID)"
- And I select "Groupings" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Groupings"
And "Delete" "link" should not exist in the "Grouping (with ID)" "table_row"
And I click on "Delete" "link" in the "Grouping (without ID)" "table_row"
And I press "Yes"
diff --git a/group/tests/behat/groups_import.feature b/group/tests/behat/groups_import.feature
index 0c738ae850e..5f2fdc2c6ec 100644
--- a/group/tests/behat/groups_import.feature
+++ b/group/tests/behat/groups_import.feature
@@ -41,7 +41,7 @@ Feature: Importing of groups and groupings
And I should see "No" in the "Group messaging" "select"
And I press "Cancel"
# Check groupings
- And I select "Groupings" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Groupings"
And I should see "Grouping-1"
And I should see "Grouping-2"
And I should see "Grouping-3"
diff --git a/group/tests/behat/id_uniqueness.feature b/group/tests/behat/id_uniqueness.feature
index 53583b03cf3..6f4e7891c90 100644
--- a/group/tests/behat/id_uniqueness.feature
+++ b/group/tests/behat/id_uniqueness.feature
@@ -14,11 +14,10 @@ Feature: Uniqueness of Group ID number
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
- And I log in as "teacher1"
- And I am on the "Course 1" "groups" page
Scenario: Group ID number uniqueness
- Given I press "Create group"
+ Given I am on the "Course 1" "groups" page logged in as "teacher1"
+ And I press "Create group"
And I set the following fields to these values:
| Group name | Group 1 |
| Group ID number | G1 |
@@ -41,7 +40,7 @@ Feature: Uniqueness of Group ID number
And I press "Cancel"
Scenario: Grouping ID number uniqueness
- Given I select "Groupings" from the "jump" singleselect
+ Given I am on the "Course 1" "groupings" page logged in as "teacher1"
And I press "Create grouping"
And I set the following fields to these values:
| Grouping name | Grouping 1 |
diff --git a/group/tests/behat/overview.feature b/group/tests/behat/overview.feature
index 388a3e0a1bd..6db9e8b4730 100644
--- a/group/tests/behat/overview.feature
+++ b/group/tests/behat/overview.feature
@@ -56,10 +56,7 @@ Feature: Group overview
| GG2 | G3 |
Scenario: Filter the overview in various different ways
- Given I log in as "teacher1"
- And I am on the "Course 1" "groups" page
- And I select "Overview" from the "jump" singleselect
-
+ Given I am on the "Course 1" "groups overview" page logged in as "teacher1"
# Grouping All and Group All filter
When I select "All" from the "Grouping" singleselect
And I select "All" from the "group" singleselect
diff --git a/group/tests/behat/update_groups.feature b/group/tests/behat/update_groups.feature
index 28400c253f7..58181bd5a9d 100644
--- a/group/tests/behat/update_groups.feature
+++ b/group/tests/behat/update_groups.feature
@@ -25,7 +25,7 @@ Feature: Automatic updating of groups and groupings
| Group name | Group (with ID) |
| Group ID number | An ID |
And I press "Save changes"
- And I select "Groupings" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Groupings"
And I press "Create grouping"
And I set the following fields to these values:
| Grouping name | Grouping (without ID) |
@@ -35,7 +35,7 @@ Feature: Automatic updating of groups and groupings
| Grouping name | Grouping (with ID) |
| Grouping ID number | An ID |
And I press "Save changes"
- And I select "Groups" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Groups"
@javascript
Scenario: Update groups and groupings with ID numbers
@@ -51,7 +51,7 @@ Feature: Automatic updating of groups and groupings
And I press "Edit group settings"
And the field "idnumber" matches value "An ID (updated)"
And I press "Save changes"
- And I select "Groupings" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Groupings"
And I click on "Edit" "link" in the "Grouping (with ID)" "table_row"
And the field "idnumber" matches value "An ID"
And I set the following fields to these values:
@@ -82,7 +82,7 @@ Feature: Automatic updating of groups and groupings
And the "idnumber" "field" should be readonly
And the field "idnumber" matches value "An ID"
And I press "Save changes"
- And I select "Groupings" from the "jump" singleselect
+ And I set the field "Participants tertiary navigation" to "Groupings"
And I click on "Edit" "link" in the "Grouping (with ID)" "table_row"
And the "idnumber" "field" should be readonly
And the field "idnumber" matches value "An ID"
diff --git a/lib/classes/output/participants_action_bar.php b/lib/classes/output/participants_action_bar.php
index 7ed7d8ef9e6..4195649e8a8 100644
--- a/lib/classes/output/participants_action_bar.php
+++ b/lib/classes/output/participants_action_bar.php
@@ -195,15 +195,17 @@ class participants_action_bar implements \renderable {
* Gets the url_select to be displayed in the participants page if available.
*
* @param \renderer_base $output
- * @return object|null The content required to render the url_select
+ * @return object|null The content required to render the tertiary navigation
*/
public function get_dropdown(\renderer_base $output): ?object {
if ($urlselectcontent = $this->get_content_for_select()) {
$activeurl = $this->find_active_page($urlselectcontent);
$activeurl = $activeurl ?: $this->find_active_page($urlselectcontent, URL_MATCH_BASE);
- $urlselect = new \url_select($urlselectcontent, $activeurl, null);
- $urlselect->set_label(get_string('participantsnavigation', 'course'), ['class' => 'sr-only']);
- return $urlselect->export_for_template($output);
+
+ $selectmenu = new select_menu('participantsnavigation', $urlselectcontent, $activeurl);
+ $selectmenu->set_label(get_string('participantsnavigation', 'course'), ['class' => 'sr-only']);
+
+ return $selectmenu->export_for_template($output);
}
return null;
@@ -214,12 +216,12 @@ class participants_action_bar implements \renderable {
*
* @param \renderer_base $output
* @return array Consists of the following:
- * - urlselect A stdclass representing the standard navigation options to be fed into a urlselect
+ * - navigation A stdclass representing the standard navigation options to be fed into a urlselect
* - renderedcontent Rendered content to be displayed in line with the tertiary nav
*/
public function export_for_template(\renderer_base $output) {
return [
- 'urlselect' => $this->get_dropdown($output),
+ 'navigation' => $this->get_dropdown($output),
'renderedcontent' => $this->renderedcontent,
];
}
diff --git a/lib/tests/behat/behat_navigation.php b/lib/tests/behat/behat_navigation.php
index dc6e022d493..17067d9d300 100644
--- a/lib/tests/behat/behat_navigation.php
+++ b/lib/tests/behat/behat_navigation.php
@@ -754,6 +754,8 @@ class behat_navigation extends behat_base {
* | Reset | course shortname | Course to reset |
* | Course copy | course shortname | Course to copy |
* | Groups | course shortname | Groups page for the course |
+ * | Groups overview | course shortname | Groups overview page for the course |
+ * | Groupings | course shortname | Groupings page for the course |
* | Permissions | course shortname | Permissions page for the course |
* | Enrolment methods | course shortname | Enrolment methods for the course |
* | Enrolled users | course shortname | The main participants page |
@@ -853,6 +855,20 @@ class behat_navigation extends behat_base {
$identifier . '" does not exist');
}
return new moodle_url('/group/index.php', ['id' => $courseid]);
+ case 'groups overview':
+ $courseid = $this->get_course_id($identifier);
+ if (!$courseid) {
+ throw new Exception('The specified course with shortname, fullname, or idnumber "' .
+ $identifier . '" does not exist');
+ }
+ return new moodle_url('/group/overview.php', ['id' => $courseid]);
+ case 'groupings':
+ $courseid = $this->get_course_id($identifier);
+ if (!$courseid) {
+ throw new Exception('The specified course with shortname, fullname, or idnumber "' .
+ $identifier . '" does not exist');
+ }
+ return new moodle_url('/group/groupings.php', ['id' => $courseid]);
case 'permissions':
$courseid = $this->get_course_id($identifier);
if (!$courseid) {
diff --git a/theme/boost/tests/behat/category_role_assignment.feature b/theme/boost/tests/behat/category_role_assignment.feature
index 00a8ffb3cac..f608349a18a 100644
--- a/theme/boost/tests/behat/category_role_assignment.feature
+++ b/theme/boost/tests/behat/category_role_assignment.feature
@@ -25,7 +25,7 @@ Feature: Role assignments can be made at the category level
And I am on course index
When I follow "Cat 1"
And I navigate to "Permissions" in current page administration
- Then I should see "Assign roles" in the "jump" "select"
+ Then "Assign roles" "text" should exist in the ".tertiary-navigation" "css_element"
@javascript
Scenario: A user with a category role cannot assign roles if there are no roles to assign
@@ -41,4 +41,4 @@ Feature: Role assignments can be made at the category level
And I am on course index
When I follow "Cat 1"
And I navigate to "Permissions" in current page administration
- Then I should not see "Assign roles" in the "jump" "select"
+ Then "Assign roles" "text" should not exist in the ".tertiary-navigation" "css_element"
diff --git a/user/index.php b/user/index.php
index f057ad9771a..d75a4f39d3c 100644
--- a/user/index.php
+++ b/user/index.php
@@ -116,8 +116,6 @@ echo $OUTPUT->render_participants_tertiary_nav($course, html_writer::div($enrolb
'data-table-uniqueid' => $participanttable->uniqueid,
]));
-echo $OUTPUT->heading(get_string('enrolledusers', 'enrol'));
-
$filterset = new \core_user\table\participants_filterset();
$filterset->add_filter(new integer_filter('courseid', filter::JOINTYPE_DEFAULT, [(int)$course->id]));