mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Show enrolled courses on user page to teachers
See http://moodle.org/mod/forum/discuss.php?d=3562
This commit is contained in:
parent
fb88144ba4
commit
9c72928dc3
@ -124,6 +124,18 @@
|
||||
print_row("icq:","<a href=\"http://web.icq.com/wwp?uin=$user->icq\">$user->icq <img src=\"http://web.icq.com/whitepages/online?icq=$user->icq&img=5\" width=18 height=18 border=0></a>");
|
||||
}
|
||||
|
||||
if (isteacher($course->id)) {
|
||||
if ($mycourses = get_my_courses($user->id)) {
|
||||
$courselisting = '';
|
||||
foreach ($mycourses as $mycourse) {
|
||||
if ($mycourse->visible) {
|
||||
$courselisting .= "<a href=\"$CFG->wwwroot/course/view.php?id=$mycourse->id\">$mycourse->fullname</a>, ";
|
||||
}
|
||||
}
|
||||
print_row(get_string('courses').':', rtrim($courselisting,', '));
|
||||
}
|
||||
}
|
||||
|
||||
if ($user->lastaccess) {
|
||||
$datestring = userdate($user->lastaccess)."  (".format_time(time() - $user->lastaccess).")";
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user