From 64a184298d7eb065350fa62bb6bea1d0b56b9ea6 Mon Sep 17 00:00:00 2001 From: Roberto Pinna Date: Thu, 24 May 2018 11:30:50 +0200 Subject: [PATCH] #192 Fixed report fields for download --- classes/report_table.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/classes/report_table.php b/classes/report_table.php index e34be5b..f2dbca0 100644 --- a/classes/report_table.php +++ b/classes/report_table.php @@ -86,7 +86,7 @@ class report_table extends \table_sql { $headers[] = get_string('file'); } - if (has_capability('mod/customcert:manage', \context_module::instance($cm->id))) { + if (!$this->is_downloading() && has_capability('mod/customcert:manage', \context_module::instance($cm->id))) { $columns[] = 'actions'; $headers[] = ''; } @@ -113,7 +113,11 @@ class report_table extends \table_sql { public function col_fullname($user) { global $OUTPUT; - return $OUTPUT->user_picture($user) . ' ' . fullname($user); + if (!$this->is_downloading()) { + return $OUTPUT->user_picture($user) . ' ' . fullname($user); + } else { + return fullname($user); + } } /**