MDL-59363 mod_workshop: user object must have alternative name fields
authorMarina Glancy <marina@moodle.com>
Tue, 27 Jun 2017 00:33:19 +0000 (08:33 +0800)
committerMarina Glancy <marina@moodle.com>
Wed, 28 Jun 2017 03:36:11 +0000 (11:36 +0800)
mod/workshop/lib.php

index 635774d..526fc43 100644 (file)
@@ -1522,7 +1522,8 @@ function workshop_get_file_info($browser, $areas, $course, $cm, $context, $filea
 
         } else {
 
-            $sql = "SELECT s.id, u.lastname, u.firstname
+            $userfields = get_all_user_name_fields(true, 'u');
+            $sql = "SELECT s.id, $userfields
                       FROM {workshop_submissions} s
                       JOIN {user} u ON (s.authorid = u.id)
                      WHERE s.example = 0 AND s.workshopid = ?";