mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-12373 - If you can see your user profile, but don't have moodle/course:viewparticipants, you get a link in the nav bar that takes you to an error message. Merged from MOODLE_19_STABLE.
This commit is contained in:
parent
6e4ca69ad7
commit
2990e11355
@ -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', $systemcontext)) {
|
||||
$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!
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user