mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
Merge branch 'master_MDL-56886' of https://github.com/golenkovm/moodle
This commit is contained in:
commit
9a37e86c6b
1 changed files with 13 additions and 3 deletions
|
@ -1483,9 +1483,7 @@ class global_navigation extends navigation_node {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give the local plugins a chance to include some navigation if they want.
|
// Give the local plugins a chance to include some navigation if they want.
|
||||||
foreach (get_plugin_list_with_function('local', 'extend_navigation') as $function) {
|
$this->load_local_plugin_navigation();
|
||||||
$function($this);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove any empty root nodes
|
// Remove any empty root nodes
|
||||||
foreach ($this->rootnodes as $node) {
|
foreach ($this->rootnodes as $node) {
|
||||||
|
@ -1517,6 +1515,15 @@ class global_navigation extends navigation_node {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function gives local plugins an opportunity to modify navigation.
|
||||||
|
*/
|
||||||
|
protected function load_local_plugin_navigation() {
|
||||||
|
foreach (get_plugin_list_with_function('local', 'extend_navigation') as $function) {
|
||||||
|
$function($this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the current user is a parent of the user being currently viewed.
|
* Returns true if the current user is a parent of the user being currently viewed.
|
||||||
*
|
*
|
||||||
|
@ -3261,6 +3268,9 @@ class global_navigation_for_ajax extends global_navigation {
|
||||||
$this->load_for_user(null, true);
|
$this->load_for_user(null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Give the local plugins a chance to include some navigation if they want.
|
||||||
|
$this->load_local_plugin_navigation();
|
||||||
|
|
||||||
$this->find_expandable($this->expandable);
|
$this->find_expandable($this->expandable);
|
||||||
return $this->expandable;
|
return $this->expandable;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue