navigation MDL-1001 Fixed wrong capability during context call
authorSam Hemelryk <sam@moodle.com>
Wed, 6 Oct 2010 06:50:36 +0000 (06:50 +0000)
committerSam Hemelryk <sam@moodle.com>
Wed, 6 Oct 2010 06:50:36 +0000 (06:50 +0000)
lib/navigationlib.php

index 485dfeb..f24fd62 100644 (file)
@@ -1972,7 +1972,7 @@ class global_navigation extends navigation_node {
         $coursenode->add('frontpageloaded', null, self::TYPE_CUSTOM, null, 'frontpageloaded')->display = false;
 
         //Participants
-        if (has_capability('moodle/course:viewparticipants', $this->page->context)) {
+        if (has_capability('moodle/course:viewparticipants',  get_system_context())) {
             $coursenode->add(get_string('participants'), new moodle_url('/user/index.php?id='.$course->id), self::TYPE_CUSTOM, get_string('participants'), 'participants');
         }