MDL-73837 reportbuilder: use column attributes in system reports.

This commit is contained in:
Paul Holden
2022-02-10 13:17:01 +00:00
parent 6652ec135b
commit b393248400
2 changed files with 9 additions and 4 deletions
@@ -94,8 +94,7 @@ class custom_report_table extends base_report_table {
$hasaggregatedcolumns = !empty($aggregatedcolumns);
$showuniquerows = !$hasaggregatedcolumns && $this->persistent->get('uniquerows');
$columnheaders = [];
$columnsattributes = [];
$columnheaders = $columnsattributes = [];
foreach ($columns as $column) {
$columnheading = $column->get_persistent()->get_formatted_heading($this->report->get_context());
$columnheaders[$column->get_column_alias()] = $columnheading !== '' ? $columnheading : $column->get_title();
@@ -127,7 +126,7 @@ class custom_report_table extends base_report_table {
$column->add_attributes(['data-cardviewhidden' => '']);
}
// Generate row attributes to be included in each cell.
// Generate column attributes to be included in each cell.
$columnsattributes[$column->get_column_alias()] = $column->get_attributes();
}