[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface coursecatalog.pm
raeburn
raeburn at source.lon-capa.org
Mon Sep 1 14:24:49 EDT 2025
raeburn Mon Sep 1 18:24:49 2025 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface coursecatalog.pm
Log:
- For 2.11
Backport 1.107
Index: loncom/interface/coursecatalog.pm
diff -u loncom/interface/coursecatalog.pm:1.88.2.9 loncom/interface/coursecatalog.pm:1.88.2.10
--- loncom/interface/coursecatalog.pm:1.88.2.9 Sun Dec 12 21:47:58 2021
+++ loncom/interface/coursecatalog.pm Mon Sep 1 18:24:49 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for displaying the course catalog interface
#
-# $Id: coursecatalog.pm,v 1.88.2.9 2021/12/12 21:47:58 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.88.2.10 2025/09/01 18:24:49 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1850,7 +1850,13 @@
@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('<br />', at categories);
}
if ($categorylist eq '') {
More information about the LON-CAPA-cvs
mailing list