Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 66062dd31098630fe4bfcd04f96d326bc4b33730 1 parent ecac31f
martin authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/choice/report.php
View
6 mod/choice/report.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.