From ed44f0aa620198edd76bf131cdafecfe19a68f69 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Mon, 20 Jan 2014 16:15:37 +0800 Subject: [PATCH] MDL-43765 reports: Fixed addtional name warning Fix the alternate name warning which is generated when course participation report is viewed --- report/participation/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/report/participation/index.php b/report/participation/index.php index f64c1d3d44e..1e525e541e3 100644 --- a/report/participation/index.php +++ b/report/participation/index.php @@ -251,8 +251,8 @@ if (!empty($instanceid) && !empty($roleid)) { $groupsql = "JOIN {groups_members} gm ON (gm.userid = u.id AND gm.groupid = :groupid)"; $params['groupid'] = $currentgroup; } - - $sql = "SELECT ra.userid, u.firstname, u.lastname, u.idnumber, l.actioncount AS count + $usernamefields = get_all_user_name_fields(true, 'u'); + $sql = "SELECT ra.userid, $usernamefields, u.idnumber, l.actioncount AS count FROM (SELECT * FROM {role_assignments} WHERE contextid $relatedctxsql AND roleid = :roleid ) ra JOIN {user} u ON u.id = ra.userid $groupsql