id);
add_to_log($course->id, "user", "view all", "index.php?id=$course->id", "");
if ($course->category) {
print_header("$course->shortname: Participants", "$course->fullname",
"id>$course->shortname -> Participants", "");
} else {
print_header("$course->shortname: Participants", "$course->fullname", "Participants", "");
}
$teacherlinks = isteacher($course->id);
if ( $teachers = get_records_sql("SELECT u.* FROM user u, user_teachers t
WHERE t.course = '$course->id' AND t.user = u.id
ORDER BY t.authority")) {
echo "
".$course->teacher."s
";
foreach ($teachers as $teacher) {
print_user($teacher, $course, $teacherlinks);
}
}
if ($students = get_records_sql("SELECT u.* FROM user u, user_students s
WHERE s.course = '$course->id' AND s.user = u.id
ORDER BY u.lastaccess DESC")) {
echo "".$course->student."s
";
foreach ($students as $student) {
print_user($student, $course, $teacherlinks);
}
}
print_footer($course);
/// FUNCTIONS //////////////////
function print_user($user, $course, $teacherlinks) {
global $COUNTRIES;
echo "";
}
?>