Site participants list now shows correct list of site students

This commit is contained in:
gustav_delius
2004-08-30 18:43:13 +00:00
parent be037b8039
commit 04fd313892
+12 -22
View File
@@ -68,30 +68,20 @@
$guest = get_guest();
$exceptions .= $guest->id;
$site = get_site();
if ($course->id == $site->id) { // Show all site users (even unconfirmed)
$students = get_users(true, '', true, $exceptions, $sort.' '.$dir, $firstinitial, $lastinitial, $page*$perpage, $perpage);
$totalcount = get_users(false, '', true, '', '', '', '') - 1; // -1 to not count guest user
if ($firstinitial or $lastinitial) {
$matchcount = get_users(false, '', true, '', '', $firstinitial, $lastinitial) - 1;
} else {
$matchcount = $totalcount;
}
if ($sort == "lastaccess") {
$dsort = "s.timeaccess";
} else {
if ($sort == "lastaccess") {
$dsort = "s.timeaccess";
} else {
$dsort = "u.$sort";
}
$students = get_course_students($course->id, $dsort, $dir, $page*$perpage,
$perpage, $firstinitial, $lastinitial, $currentgroup);
$totalcount = count_course_students($course, "", "", "", $currentgroup);
if ($firstinitial or $lastinitial) {
$matchcount = count_course_students($course, "", $firstinitial, $lastinitial, $currentgroup);
} else {
$matchcount = $totalcount;
}
$dsort = "u.$sort";
}
$students = get_course_students($course->id, $dsort, $dir, $page*$perpage,
$perpage, $firstinitial, $lastinitial, $currentgroup);
$totalcount = count_course_students($course, "", "", "", $currentgroup);
if ($firstinitial or $lastinitial) {
$matchcount = count_course_students($course, "", $firstinitial, $lastinitial, $currentgroup);
} else {
$matchcount = $totalcount;
}
echo "<h2 align=center>$totalcount $course->students</h2>";