MDL-55477 quiz reports: all user fields should have repeats suppressed
authorTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 19 Aug 2016 16:56:59 +0000 (17:56 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 19 Aug 2016 17:04:51 +0000 (18:04 +0100)
mod/quiz/report/attemptsreport.php

index dca7ee9..891a12e 100644 (file)
@@ -190,7 +190,10 @@ abstract class quiz_attempts_report extends quiz_default_report {
     protected function configure_user_columns($table) {
         $table->column_suppress('picture');
         $table->column_suppress('fullname');
-        $table->column_suppress('idnumber');
+        $extrafields = get_extra_user_fields($this->context);
+        foreach ($extrafields as $field) {
+            $table->column_suppress($field);
+        }
 
         $table->column_class('picture', 'picture');
         $table->column_class('lastname', 'bold');