Merge branch 'MDL-73646-master-v2' of https://github.com/sharidas/moodle

This commit is contained in:
Jun Pataleta 2022-02-03 19:09:37 +08:00
commit 4e1a6e6830
4 changed files with 40 additions and 4 deletions

View file

@ -106,7 +106,7 @@ class primary extends view {
} else if (in_array($this->context->contextlevel, [CONTEXT_COURSE, CONTEXT_MODULE])) {
$activekey = 'courses';
} 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';
}
}