mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-47585 stats: fixed incorrect user dropdown
This commit is contained in:
parent
b5780fbd18
commit
960bb64a2e
@ -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";
|
||||
@ -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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user