MDL-73745 reportbuilder: check for presence of active column headers.

This commit is contained in:
Paul Holden
2022-02-24 16:26:56 +00:00
parent e94167174a
commit 600cd22b0f
2 changed files with 6 additions and 1 deletions
@@ -218,7 +218,7 @@ class custom_report_table extends base_report_table {
*
* @return column[]
*/
private function get_active_columns(): array {
protected function get_active_columns(): array {
return $this->report->get_active_columns();
}
@@ -36,6 +36,11 @@ class custom_report_table_view extends custom_report_table {
* Override printed headers, to use those of grandparent class
*/
public function print_headers() {
$columns = $this->get_active_columns();
if (empty($columns)) {
return;
}
base_report_table::print_headers();
}