Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added names of unenrolled students to drop-down list of users names f…

…or which a report can be generated
  • Loading branch information...
commit e8737871687e1015eb557b29c80797babc98a71b 1 parent fb4990c
gbateson authored
Showing with 22 additions and 2 deletions.
  1. +22 −2 mod/hotpot/report.php
View
24 mod/hotpot/report.php
@@ -463,14 +463,34 @@ function hotpot_print_report_selector(&$course, &$hotpot, &$formdata) {
u.id, u.firstname, u.lastname
FROM
{$CFG->prefix}user AS u,
+ {$CFG->prefix}hotpot_attempts AS ha
+ WHERE
+ u.id = ha.userid AND ha.hotpot=$hotpot->id
+ ORDER BY
+ u.lastname
+ ");
+ $students = get_records_sql("
+ SELECT
+ u.id, u.firstname, u.lastname
+ FROM
+ {$CFG->prefix}user AS u,
{$CFG->prefix}user_students AS us
WHERE
u.id = us.userid AND us.course=$course->id
ORDER BY
u.lastname
");
- if ($users) {
- $menus['reportusers'][''] = '------'; // separator
+ if (!empty($students)) {
+ $menus['reportusers']['separator01'] = '------';
+ foreach ($students as $id=>$user) {
+ if (isset($users[$id])) {
+ $menus['reportusers']["$id"] = fullname($user);
+ unset($users[$id]);
+ }
+ }
+ }
+ if (!empty($users)) {
+ $menus['reportusers']['separator02'] = '------';
foreach ($users as $id=>$user) {
$menus['reportusers']["$id"] = fullname($user);
}
Please sign in to comment.
Something went wrong with that request. Please try again.