Skip to content

Commit

Permalink
Merge branch 'wip-MDL-47585-m27' of git://github.com/marinaglancy/moo…
Browse files Browse the repository at this point in the history
…dle into MOODLE_27_STABLE
  • Loading branch information
Sam Hemelryk committed Oct 27, 2014
2 parents fc9ff77 + b530fdb commit c18c38f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions report/stats/locallib.php
Expand Up @@ -111,7 +111,8 @@ function report_stats_report($course, $report, $mode, $user, $roleid, $time) {

list($sort, $moreparams) = users_order_by_sql('u');
$moreparams['courseid'] = $course->id;
$sql = "SELECT DISTINCT u.id, u.firstname, u.lastname, u.idnumber
$fields = user_picture::fields('u', array('idnumber'));
$sql = "SELECT DISTINCT $fields
FROM {stats_user_{$param->table}} s
JOIN {user} u ON u.id = s.userid
WHERE courseid = :courseid";
Expand All @@ -128,9 +129,8 @@ function report_stats_report($course, $report, $mode, $user, $roleid, $time) {
if (!$us = $DB->get_records_sql($sql, array_merge($param->params, $moreparams))) {
print_error('nousers');
}

foreach ($us as $u) {
$users[$u->userid] = fullname($u, true);
$users[$u->id] = fullname($u, true);
}

$table->align = array('left','left','left','left','left','left','left','left');
Expand Down

0 comments on commit c18c38f

Please sign in to comment.