Skip to content

Commit

Permalink
Merge branch 'MDL-74284' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Sep 27, 2022
2 parents 392bf7d + 3c3f6ab commit 98ee21c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
12 changes: 7 additions & 5 deletions cohort/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@
$showall = false;
} else {
admin_externalpage_setup('cohorts', '', null, '', array('pagelayout'=>'report'));
$PAGE->set_primary_active_tab('siteadminnode');
if ($showall == 1) {
$PAGE->navbar->add(get_string('allcohorts', 'cohort'), $PAGE->url);
} else if (!$showall) {
$PAGE->navbar->add(get_string('systemcohorts', 'cohort'), $PAGE->url);
navigation_node::override_active_url(new moodle_url('/cohort/index.php'));
if ($showall) {
$strallcohorts = get_string('allcohorts', 'cohort');
$PAGE->set_title($strallcohorts);
$PAGE->navbar->add($strallcohorts, $PAGE->url);
} else {
$PAGE->set_title(get_string('systemcohorts', 'cohort'));
}
}

Expand Down
1 change: 1 addition & 0 deletions cohort/upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
}

$strheading = get_string('uploadcohorts', 'cohort');
$PAGE->set_title($strheading);
$PAGE->navbar->add($strheading);

echo $OUTPUT->header();
Expand Down
3 changes: 2 additions & 1 deletion user/tests/behat/siteadmin_user_breadcrumbs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ Feature: Verify the breadcrumbs in users account and cohort site administration
And "Add a new user" "text" should exist in the ".breadcrumb" "css_element"
And "Accounts" "link" should exist in the ".breadcrumb" "css_element"
And I navigate to "Users > Accounts > Cohorts" in site administration
And "System cohorts" "text" should exist in the ".breadcrumb" "css_element"
And "Cohorts" "text" should exist in the ".breadcrumb" "css_element"
And "Accounts" "link" should exist in the ".breadcrumb" "css_element"
When I click on "All cohorts" "link"
Then "All cohorts" "text" should exist in the ".breadcrumb" "css_element"
And "Cohorts" "link" should exist in the ".breadcrumb" "css_element"
And "Accounts" "link" should exist in the ".breadcrumb" "css_element"
And I click on "Add new cohort" "link"
And "Add new cohort" "text" should exist in the ".breadcrumb" "css_element"
Expand Down

0 comments on commit 98ee21c

Please sign in to comment.