Skip to content

Commit

Permalink
navigation MDL-22973 AJAX expansion of a course now includes enrolled…
Browse files Browse the repository at this point in the history
… users in participants branch
  • Loading branch information
Sam Hemelryk committed Jul 28, 2010
1 parent 708c2e0 commit 588a395
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/navigationlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,7 @@ public function __construct($page, $branchtype, $id) {
* @return array The expandable nodes
*/
public function initialise($branchtype, $id) {
global $CFG, $DB, $PAGE, $SITE;
global $CFG, $DB, $PAGE, $SITE, $USER;

if ($this->initialised || during_initial_install()) {
return $this->expandable;
Expand Down Expand Up @@ -2033,6 +2033,11 @@ public function initialise($branchtype, $id) {
throw new Exception('Unknown type');
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);
return $this->expandable;
}
Expand Down

0 comments on commit 588a395

Please sign in to comment.