mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
Merge branch 'MDL-24724_course_profile' of git://github.com/andyjdavis/moodle
This commit is contained in:
commit
65361ab836
1 changed files with 9 additions and 0 deletions
|
@ -236,6 +236,15 @@ echo '</div>';
|
|||
|
||||
echo '<table class="list" summary="">';
|
||||
|
||||
//checks were performed above that ensure that if we've got to here either the user
|
||||
//is viewing their own profile ($USER->id == $user->id) or $user is enrolled in the course
|
||||
if ($currentuser
|
||||
or $user->maildisplay == 1 //allow everyone to see email address
|
||||
or ($user->maildisplay == 2 && is_enrolled($coursecontext, $USER)) //fellow course members can see email. Already know $user is enrolled
|
||||
or has_capability('moodle/course:useremail', $coursecontext)) {
|
||||
print_row(get_string("email").":", obfuscate_mailto($user->email, ''));
|
||||
}
|
||||
|
||||
// Show last time this user accessed this course
|
||||
if (!isset($hiddenfields['lastaccess'])) {
|
||||
if ($lastaccess = $DB->get_record('user_lastaccess', array('userid'=>$user->id, 'courseid'=>$course->id))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue