Skip to content

Commit

Permalink
MDL-82904 core_badges: Display empty column for unset criteria
Browse files Browse the repository at this point in the history
* In the report builder badges with unset criteria should have a empty
value for the criteria column
  • Loading branch information
laurentdavid committed Sep 12, 2024
1 parent 3477082 commit 6e5c90d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion badges/classes/reportbuilder/local/entities/badge.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ protected function get_all_columns(): array {
return '';
}
$badge = new \core_badges\badge($badgeid);

if (empty($badge->criteria)) {
return '';
}
$renderer = $PAGE->get_renderer('core_badges');
return $renderer->print_badge_criteria($badge, 'short');
});
Expand Down

0 comments on commit 6e5c90d

Please sign in to comment.