From 0abc6a0f5c15d6c2f4d566493d23e1f3f837c9e7 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Fri, 13 Mar 2015 00:00:05 -0700 Subject: [PATCH] Fixed issue with debugging message due to additional name fields missing --- element/teachername/lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/element/teachername/lib.php b/element/teachername/lib.php index 4a342ac..2306a67 100644 --- a/element/teachername/lib.php +++ b/element/teachername/lib.php @@ -60,7 +60,7 @@ class customcert_element_teachername extends customcert_element_base { public function render($pdf, $preview) { global $DB; - $teacher = $DB->get_record('user', array('id' => $this->element->data), 'id, firstname, lastname'); + $teacher = $DB->get_record('user', array('id' => $this->element->data)); $teachername = fullname($teacher); parent::render_content($pdf, $teachername); @@ -79,7 +79,7 @@ class customcert_element_teachername extends customcert_element_base { $teachers = array(); // Now return all users who can manage the customcert in this context. - if ($users = get_users_by_capability(context_module::instance($cmid), 'mod/customcert:manage', 'u.id, u.firstname, u.lastname')) { + if ($users = get_users_by_capability(context_module::instance($cmid), 'mod/customcert:manage')) { foreach ($users as $user) { $teachers[$user->id] = fullname($user); }