--- loncom/interface/coursecatalog.pm 2025/02/15 00:07:48 1.106 +++ loncom/interface/coursecatalog.pm 2025/02/24 13:40:33 1.107 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler for displaying the course catalog interface # -# $Id: coursecatalog.pm,v 1.106 2025/02/15 00:07:48 raeburn Exp $ +# $Id: coursecatalog.pm,v 1.107 2025/02/24 13:40:33 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1895,7 +1895,13 @@ sub courseinfo_row { @cats = split('&',$categories); } if ((ref($trails) eq 'ARRAY') && (ref($allitems) eq 'HASH')) { - my @categories = map { $trails->[$allitems->{$_}]; } @cats; + my @categories; + foreach my $cat (@cats) { + next if ($cat eq ''); + if (($allitems->{$cat} ne '') && ($trails->[$allitems->{$cat}] ne '')) { + push(@categories,$trails->[$allitems->{$cat}]); + } + } $categorylist = join('
',@categories); } if ($categorylist eq '') {