I'll see your hack of Gustav's hack, and raise it with a datalib function and a CVS checkin.
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,', '));
}
}
General help
Showing which courses a student is enrolled in
This discussion has been locked so you can no longer reply to it.