Sort names by firstname, and include even columns with no answers

This commit is contained in:
martin 2002-08-18 09:47:59 +00:00
parent ecac31f1ff
commit 66062dd310

View File

@ -35,7 +35,7 @@
<A HREF=view.php?id=$cm->id>$choice->name</A> -> $strresponses", "");
if (! $users = get_course_users($course->id)) {
if (! $users = get_course_users($course->id, "u.firstname ASC")) {
error("No users found (very strange)");
}
@ -50,6 +50,10 @@
$timenow = time();
for ($i=0; $i<=2; $i++) { // number of choices (presently hardcoded)
$useranswer[$i] = array();
}
foreach ($users as $user) {
$answer = $answers[$user->id];
$useranswer[(int)$answer->answer][] = $user;