Re-add code column (#264)
This commit is contained in:
parent
e0366eb398
commit
f2a86d4098
1 changed files with 13 additions and 0 deletions
|
@ -74,6 +74,7 @@ class report_table extends \table_sql {
|
||||||
$columns[] = $extrafield;
|
$columns[] = $extrafield;
|
||||||
}
|
}
|
||||||
$columns[] = 'timecreated';
|
$columns[] = 'timecreated';
|
||||||
|
$columns[] = 'code';
|
||||||
|
|
||||||
$headers = [];
|
$headers = [];
|
||||||
$headers[] = get_string('fullname');
|
$headers[] = get_string('fullname');
|
||||||
|
@ -81,6 +82,7 @@ class report_table extends \table_sql {
|
||||||
$headers[] = get_user_field_name($extrafield);
|
$headers[] = get_user_field_name($extrafield);
|
||||||
}
|
}
|
||||||
$headers[] = get_string('receiveddate', 'customcert');
|
$headers[] = get_string('receiveddate', 'customcert');
|
||||||
|
$headers[] = get_string('code', 'customcert');
|
||||||
|
|
||||||
// Check if we were passed a filename, which means we want to download it.
|
// Check if we were passed a filename, which means we want to download it.
|
||||||
if ($download) {
|
if ($download) {
|
||||||
|
@ -101,6 +103,7 @@ class report_table extends \table_sql {
|
||||||
$this->define_headers($headers);
|
$this->define_headers($headers);
|
||||||
$this->collapsible(false);
|
$this->collapsible(false);
|
||||||
$this->sortable(true);
|
$this->sortable(true);
|
||||||
|
$this->no_sorting('code');
|
||||||
$this->no_sorting('download');
|
$this->no_sorting('download');
|
||||||
$this->is_downloadable(true);
|
$this->is_downloadable(true);
|
||||||
|
|
||||||
|
@ -135,6 +138,16 @@ class report_table extends \table_sql {
|
||||||
return userdate($user->timecreated);
|
return userdate($user->timecreated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate the code column.
|
||||||
|
*
|
||||||
|
* @param \stdClass $user
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function col_code($user) {
|
||||||
|
return $user->code;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the download column.
|
* Generate the download column.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue