Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
de55d46
)
user-profile MDL-22499 Added context checks around the link in a users course profile...
author
Sam Hemelryk
<sam@moodle.com>
Fri, 24 Sep 2010 03:14:27 +0000
(
03:14
+0000)
committer
Sam Hemelryk
<sam@moodle.com>
Fri, 24 Sep 2010 03:14:27 +0000
(
03:14
+0000)
user/view.php
patch
|
blob
|
blame
|
history
diff --git
a/user/view.php
b/user/view.php
index
0c1efa7
..
2f9b8e9
100644
(file)
--- a/
user/view.php
+++ b/
user/view.php
@@
-292,9
+292,11
@@
if (!isset($hiddenfields['mycourses'])) {
echo "</table></div></div>";
echo "</table></div></div>";
-echo '<div class="fullprofilelink">';
-echo html_writer::link($CFG->wwwroot.'/user/profile.php?id='.$id, get_string('fullprofile'));
-echo '</div>';
+if ($currentuser || has_capability('moodle/user:viewdetails', $usercontext) || has_coursecontact_role($id)) {
+ echo '<div class="fullprofilelink">';
+ echo html_writer::link($CFG->wwwroot.'/user/profile.php?id='.$id, get_string('fullprofile'));
+ echo '</div>';
+}
/// TODO Add more useful overview info for teachers here, see below
/// TODO Add more useful overview info for teachers here, see below