mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Sort names by firstname, and include even columns with no answers
This commit is contained in:
parent
ecac31f1ff
commit
66062dd310
1 changed files with 5 additions and 1 deletions
|
@ -35,7 +35,7 @@
|
||||||
<A HREF=view.php?id=$cm->id>$choice->name</A> -> $strresponses", "");
|
<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)");
|
error("No users found (very strange)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +50,10 @@
|
||||||
|
|
||||||
$timenow = time();
|
$timenow = time();
|
||||||
|
|
||||||
|
for ($i=0; $i<=2; $i++) { // number of choices (presently hardcoded)
|
||||||
|
$useranswer[$i] = array();
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
$answer = $answers[$user->id];
|
$answer = $answers[$user->id];
|
||||||
$useranswer[(int)$answer->answer][] = $user;
|
$useranswer[(int)$answer->answer][] = $user;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue