mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
navigation MDL-22973 AJAX expansion of a course now includes enrolled users in participants branch
This commit is contained in:
parent
708c2e041a
commit
588a3953ae
1 changed files with 6 additions and 1 deletions
|
@ -1959,7 +1959,7 @@ class global_navigation_for_ajax extends global_navigation {
|
||||||
* @return array The expandable nodes
|
* @return array The expandable nodes
|
||||||
*/
|
*/
|
||||||
public function initialise($branchtype, $id) {
|
public function initialise($branchtype, $id) {
|
||||||
global $CFG, $DB, $PAGE, $SITE;
|
global $CFG, $DB, $PAGE, $SITE, $USER;
|
||||||
|
|
||||||
if ($this->initialised || during_initial_install()) {
|
if ($this->initialised || during_initial_install()) {
|
||||||
return $this->expandable;
|
return $this->expandable;
|
||||||
|
@ -2033,6 +2033,11 @@ class global_navigation_for_ajax extends global_navigation {
|
||||||
throw new Exception('Unknown type');
|
throw new Exception('Unknown type');
|
||||||
return $this->expandable;
|
return $this->expandable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->page->context->contextlevel == CONTEXT_COURSE && $this->page->context->instanceid != SITEID) {
|
||||||
|
$this->load_for_user(null, true);
|
||||||
|
}
|
||||||
|
|
||||||
$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