mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
merged taking out extra isteacher()
This commit is contained in:
parent
ffbf004fa1
commit
dd5e0901d7
@ -279,21 +279,19 @@
|
||||
print_row(get_string('msnid').':', s($user->msn));
|
||||
}
|
||||
|
||||
if (isteacher($course->id)) {
|
||||
if ($mycourses = get_my_courses($user->id)) {
|
||||
$courselisting = '';
|
||||
foreach ($mycourses as $mycourse) {
|
||||
if ($mycourse->visible and $mycourse->category) {
|
||||
if ($mycourse->id != $course->id){
|
||||
$courselisting .= "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$mycourse->id\">$mycourse->fullname</a>, ";
|
||||
}
|
||||
else {
|
||||
$courselisting .= "$mycourse->fullname, ";
|
||||
}
|
||||
if ($mycourses = get_my_courses($user->id)) {
|
||||
$courselisting = '';
|
||||
foreach ($mycourses as $mycourse) {
|
||||
if ($mycourse->visible and $mycourse->category) {
|
||||
if ($mycourse->id != $course->id){
|
||||
$courselisting .= "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$mycourse->id\">$mycourse->fullname</a>, ";
|
||||
}
|
||||
else {
|
||||
$courselisting .= "$mycourse->fullname, ";
|
||||
}
|
||||
}
|
||||
print_row(get_string('courses').':', rtrim($courselisting,', '));
|
||||
}
|
||||
print_row(get_string('courses').':', rtrim($courselisting,', '));
|
||||
}
|
||||
|
||||
if (!isset($hiddenfields['lastaccess'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user