Skip to content

Commit

Permalink
MDL-81776 reportbuilder: Check tagarea enabled when check availability
Browse files Browse the repository at this point in the history
- When checking availability for a column/filter we need to assert
tagarea is enabled because it can return also null value.
  • Loading branch information
dravek committed May 3, 2024
1 parent 67b2c43 commit 45b43d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reportbuilder/classes/local/systemreports/reports_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected function add_columns(): void {
AND ti.itemid = {$tablealias}.id
)", 'tags')
->set_is_sortable(true)
->set_is_available(core_tag_tag::is_enabled('core_reportbuilder', 'reportbuilder_report'))
->set_is_available(core_tag_tag::is_enabled('core_reportbuilder', 'reportbuilder_report') === true)
->add_callback(static function(?string $tags): string {
return implode(', ', array_map(static function(string $tag): string {
[$name, $rawname] = explode('|', $tag);
Expand Down Expand Up @@ -265,7 +265,7 @@ protected function add_filters(): void {
'component' => 'core_reportbuilder',
'itemtype' => 'reportbuilder_report',
])
->set_is_available(core_tag_tag::is_enabled('core_reportbuilder', 'reportbuilder_report'))
->set_is_available(core_tag_tag::is_enabled('core_reportbuilder', 'reportbuilder_report') === true)
);

// Time created filter.
Expand Down

0 comments on commit 45b43d1

Please sign in to comment.