Index: user/view.php =================================================================== RCS file: /cvsroot/moodle/moodle/user/view.php,v retrieving revision 1.168.2.2 diff -u -r1.168.2.2 view.php --- user/view.php 23 Nov 2007 21:30:46 -0000 1.168.2.2 +++ user/view.php 28 Nov 2007 15:55:29 -0000 @@ -61,7 +61,9 @@ $fullname = fullname($user, has_capability('moodle/site:viewfullnames', $coursecontext)); $navlinks = array(); - $navlinks[] = array('name' => $strparticipants, 'link' => "index.php?id=$course->id", 'type' => 'misc'); + if (has_capability('moodle/course:viewparticipants', $coursecontext) || has_capability('moodle/site:viewparticipants', $sitecontext)) { + $navlinks[] = array('name' => $strparticipants, 'link' => "index.php?id=$course->id", 'type' => 'misc'); + } /// If the user being shown is not ourselves, then make sure we are allowed to see them!