Fixed context in has_capability call MDL-13378 (merged)

This commit is contained in:
moodler 2008-02-08 03:59:38 +00:00
parent 279ac1a3e2
commit b08261a100

View File

@ -668,7 +668,7 @@
$usercontext = $user->context;
}
if ($piclink = ($USER->id == $user->id || has_capability('moodle/user:viewdetails', $context) ||has_capability('moodle/user:viewdetails', $context))) {
if ($piclink = ($USER->id == $user->id || has_capability('moodle/user:viewdetails', $context) || has_capability('moodle/user:viewdetails', $usercontext))) {
$profilelink = '<strong><a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$course->id.'">'.fullname($user).'</a></strong>';
} else {
$profilelink = '<strong>'.fullname($user).'</strong>';