From 25609fd69784abdf261cf012c84fdfead18b0084 Mon Sep 17 00:00:00 2001 From: Jaimos Skriletz Date: Sat, 17 Aug 2024 18:24:01 -0600 Subject: [PATCH] Fix warning with NULL/emptystring category in achievement list filter. --- .../Instructor/AchievementList/filter_form.html.ep | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/templates/ContentGenerator/Instructor/AchievementList/filter_form.html.ep b/templates/ContentGenerator/Instructor/AchievementList/filter_form.html.ep index f4537464f8..c64282bd37 100644 --- a/templates/ContentGenerator/Instructor/AchievementList/filter_form.html.ep +++ b/templates/ContentGenerator/Instructor/AchievementList/filter_form.html.ep @@ -7,7 +7,7 @@ [ maketext('all course achievements') => 'all' ], [ maketext('selected achievements') => 'selected' ], [ maketext('enter matching achievement IDs below') => 'match_ids', selected => undef ], - [ maketext('enter matching category below') => 'match_category' ], + [ maketext('select matching category below') => 'match_category' ], [ maketext('enabled achievements') => 'enabled' ], [ maketext('disabled achievements') => 'disabled' ] ], @@ -27,10 +27,7 @@
<%= maketext('Please enter a list of IDs to match.') %>
- % my @categories = $c->db->getAchievementCategories; - % for (@categories) { - % $_ = [$_ => $_]; - % } + % my @categories = grep { defined && $_ ne '' } $c->db->getAchievementCategories;
<%= label_for 'filter_category', class => 'col-form-label col-form-label-sm col-sm-auto', begin =%> <%= maketext('Match on which category?') =%>