mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
Sort names by firstname, and include even columns with no answers
This commit is contained in:
parent
ecac31f1ff
commit
66062dd310
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user