mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-73646-master-v2' of https://github.com/sharidas/moodle
This commit is contained in:
commit
4e1a6e6830
4 changed files with 40 additions and 4 deletions
|
@ -106,7 +106,7 @@ class primary extends view {
|
||||||
} else if (in_array($this->context->contextlevel, [CONTEXT_COURSE, CONTEXT_MODULE])) {
|
} else if (in_array($this->context->contextlevel, [CONTEXT_COURSE, CONTEXT_MODULE])) {
|
||||||
$activekey = 'courses';
|
$activekey = 'courses';
|
||||||
} else if (in_array('siteadminnode', $children) && $node = $this->get_site_admin_node()) {
|
} else if (in_array('siteadminnode', $children) && $node = $this->get_site_admin_node()) {
|
||||||
if ($this->context->contextlevel == CONTEXT_COURSECAT || $node->search_for_active_node()) {
|
if ($this->context->contextlevel == CONTEXT_COURSECAT || $node->search_for_active_node(URL_MATCH_EXACT)) {
|
||||||
$activekey = 'siteadminnode';
|
$activekey = 'siteadminnode';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -645,14 +645,15 @@ class navigation_node implements renderable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Searches all children for the best matching active node
|
* Searches all children for the best matching active node
|
||||||
|
* @param int $strength The url match to be made.
|
||||||
* @return navigation_node|false
|
* @return navigation_node|false
|
||||||
*/
|
*/
|
||||||
public function search_for_active_node() {
|
public function search_for_active_node($strength = URL_MATCH_BASE) {
|
||||||
if ($this->check_if_active(URL_MATCH_BASE)) {
|
if ($this->check_if_active($strength)) {
|
||||||
return $this;
|
return $this;
|
||||||
} else {
|
} else {
|
||||||
foreach ($this->children as &$child) {
|
foreach ($this->children as &$child) {
|
||||||
$outcome = $child->search_for_active_node();
|
$outcome = $child->search_for_active_node($strength);
|
||||||
if ($outcome !== false) {
|
if ($outcome !== false) {
|
||||||
return $outcome;
|
return $outcome;
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,6 +173,8 @@ value to get the list of blocks that won't be displayed for a theme.
|
||||||
MESSAGE_DEFAULT_PERMITTED also deprecated.
|
MESSAGE_DEFAULT_PERMITTED also deprecated.
|
||||||
core_message_get_user_notification_preferences and core_message_get_user_message_preferences Webservice are now returning enabled boolean on
|
core_message_get_user_notification_preferences and core_message_get_user_message_preferences Webservice are now returning enabled boolean on
|
||||||
components > notifications > processors. loggedin and loggedoff are deprecated but present for backward compatibility.
|
components > notifications > processors. loggedin and loggedoff are deprecated but present for backward compatibility.
|
||||||
|
* A new parameter $strength of type int is added to method search_for_active_node. This parameter would help us to search for the active nodes based on the
|
||||||
|
$strength passed to it.
|
||||||
|
|
||||||
=== 3.11.4 ===
|
=== 3.11.4 ===
|
||||||
* A new option dontforcesvgdownload has been added to the $options parameter of the send_file() function.
|
* A new option dontforcesvgdownload has been added to the $options parameter of the send_file() function.
|
||||||
|
|
33
theme/boost/tests/behat/breadcrumb.feature
Normal file
33
theme/boost/tests/behat/breadcrumb.feature
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
@javascript @theme_boost
|
||||||
|
Feature: Breadcrumbs navigation
|
||||||
|
To navigate in boost theme
|
||||||
|
As an admin user
|
||||||
|
I should see breadcrumbs
|
||||||
|
|
||||||
|
Scenario: Admin user navigates to site administrations plugins assignment settings
|
||||||
|
Given I log in as "admin"
|
||||||
|
When I navigate to "Plugins > Activity modules > Assignment > Assignment settings" in site administration
|
||||||
|
Then I should see "Activity modules" in the ".breadcrumb" "css_element"
|
||||||
|
And I should see "Assignment" in the ".breadcrumb" "css_element"
|
||||||
|
And I should see "Assignment settings" in the ".breadcrumb" "css_element"
|
||||||
|
|
||||||
|
Scenario: Admin user navigates to site adminsitrations plugins assignment feedback offline grading worksheet
|
||||||
|
Given I log in as "admin"
|
||||||
|
When I navigate to "Plugins > Activity modules > Assignment > Feedback plugins > Offline grading worksheet" in site administration
|
||||||
|
Then I should see "Activity modules" in the ".breadcrumb" "css_element"
|
||||||
|
And I should see "Assignment" in the ".breadcrumb" "css_element"
|
||||||
|
And I should see "Feedback plugins" in the ".breadcrumb" "css_element"
|
||||||
|
And I should see "Offline grading worksheet" in the ".breadcrumb" "css_element"
|
||||||
|
|
||||||
|
Scenario: Admin user navigates to site adminsitrations plugins badges manage backpacks page
|
||||||
|
Given I log in as "admin"
|
||||||
|
When I navigate to "Badges > Manage backpacks" in site administration
|
||||||
|
Then I should see "Badges" in the ".breadcrumb" "css_element"
|
||||||
|
And I should see "Manage backpacks" in the ".breadcrumb" "css_element"
|
||||||
|
|
||||||
|
Scenario: Admin user navigates to site adminsitrations plugins caching memcached page
|
||||||
|
Given I log in as "admin"
|
||||||
|
When I navigate to "Plugins > Caching > Cache stores > Memcached" in site administration
|
||||||
|
Then I should see "Caching" in the ".breadcrumb" "css_element"
|
||||||
|
Then I should see "Cache stores" in the ".breadcrumb" "css_element"
|
||||||
|
And I should see "Memcached" in the ".breadcrumb" "css_element"
|
Loading…
Add table
Add a link
Reference in a new issue