Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b5780fb
)
MDL-47585 stats: fixed incorrect user dropdown
author
Marina Glancy
<marina@moodle.com>
Thu, 9 Oct 2014 06:35:15 +0000
(14:35 +0800)
committer
Sam Hemelryk
<sam@moodle.com>
Mon, 27 Oct 2014 21:51:02 +0000
(10:51 +1300)
report/stats/locallib.php
patch
|
blob
|
blame
|
history
diff --git
a/report/stats/locallib.php
b/report/stats/locallib.php
index
0a0b6f1
..
1a671c2
100644
(file)
--- a/
report/stats/locallib.php
+++ b/
report/stats/locallib.php
@@
-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;
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";
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');
}
if (!$us = $DB->get_records_sql($sql, array_merge($param->params, $moreparams))) {
print_error('nousers');
}
-
foreach ($us as $u) {
foreach ($us as $u) {
- $users[$u->
user
id] = fullname($u, true);
+ $users[$u->id] = fullname($u, true);
}
$table->align = array('left','left','left','left','left','left','left','left');
}
$table->align = array('left','left','left','left','left','left','left','left');