From 46ea652fd9c120d0c2e50d1994fa4dc643557e4c Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Fri, 24 Sep 2010 03:14:27 +0000 Subject: [PATCH] user-profile MDL-22499 Added context checks around the link in a users course profile to view their full profile. --- user/view.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/user/view.php b/user/view.php index 0c1efa7a8ed..2f9b8e9ba30 100644 --- a/user/view.php +++ b/user/view.php @@ -292,9 +292,11 @@ if (!isset($hiddenfields['mycourses'])) { echo ""; -echo ''; +if ($currentuser || has_capability('moodle/user:viewdetails', $usercontext) || has_coursecontact_role($id)) { + echo ''; +} /// TODO Add more useful overview info for teachers here, see below -- 2.43.0