From 76204f6898a455abbe79cf3c5f8367873eec4823 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Thu, 10 Apr 2014 15:23:05 +0800 Subject: [PATCH] MDL-45036 blocks: Update to the mentee block sql to incorporate additional name fields. --- blocks/mentees/block_mentees.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blocks/mentees/block_mentees.php b/blocks/mentees/block_mentees.php index 95c30598a8f..d53d96edc95 100644 --- a/blocks/mentees/block_mentees.php +++ b/blocks/mentees/block_mentees.php @@ -28,7 +28,8 @@ class block_mentees extends block_base { $this->content = new stdClass(); // get all the mentees, i.e. users you have a direct assignment to - if ($usercontexts = $DB->get_records_sql("SELECT c.instanceid, c.instanceid, u.firstname, u.lastname + $allusernames = get_all_user_name_fields(true, 'u'); + if ($usercontexts = $DB->get_records_sql("SELECT c.instanceid, c.instanceid, $allusernames FROM {role_assignments} ra, {context} c, {user} u WHERE ra.userid = ? AND ra.contextid = c.id