Skip to content

Commit

Permalink
MDL-50314 mod_quiz: removed hardcoded export columns
Browse files Browse the repository at this point in the history
* The columns 'institution', 'department' and 'email' are no longer
  automatically included in all quiz result exports.
* These columns can still be used, but have to be configured under
  'showuseridentity'.
  • Loading branch information
t-schroeder committed Sep 7, 2018
1 parent 6e2e634 commit 3a33d51
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions mod/quiz/report/attemptsreport.php
Expand Up @@ -202,25 +202,11 @@ protected function add_user_columns($table, &$columns, &$headers) {
$headers[] = get_string('firstname');
}

// When downloading, some extra fields are always displayed (because
// there's no space constraint) so do not include in extra-field list.
$extrafields = get_extra_user_fields($this->context,
$table->is_downloading() ? array('institution', 'department', 'email') : array());
$extrafields = get_extra_user_fields($this->context);
foreach ($extrafields as $field) {
$columns[] = $field;
$headers[] = get_user_field_name($field);
}

if ($table->is_downloading()) {
$columns[] = 'institution';
$headers[] = get_string('institution');

$columns[] = 'department';
$headers[] = get_string('department');

$columns[] = 'email';
$headers[] = get_string('email');
}
}

/**
Expand Down

0 comments on commit 3a33d51

Please sign in to comment.