--- loncom/interface/lonmodifycourse.pm 2019/08/27 15:34:34 1.79.2.8
+++ loncom/interface/lonmodifycourse.pm 2024/12/30 00:34:19 1.79.2.10
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# handler for DC-only modifiable course settings
#
-# $Id: lonmodifycourse.pm,v 1.79.2.8 2019/08/27 15:34:34 raeburn Exp $
+# $Id: lonmodifycourse.pm,v 1.79.2.10 2024/12/30 00:34:19 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -664,9 +664,34 @@ sub print_settings_display {
"
$lt{'dcon'} | \n".
&Apache::loncommon::end_data_table_header_row()."\n";
foreach my $item (@items) {
+ my $shown = $enrollvar{$item};
+ if ($item eq 'crosslistings') {
+ my (@xlists,@lcsecs);
+ foreach my $entry (split(/,/,$enrollvar{$item})) {
+ my ($xlist,$lc_sec) = split(/:/,$entry);
+ push(@xlists,$xlist);
+ push(@lcsecs,$lc_sec);
+ }
+ if (@xlists) {
+ my $crskey = $cnum.':'.$enrollvar{'coursecode'};
+ my %reformatted =
+ &Apache::lonnet::auto_instsec_reformat($cdom,'declutter',
+ {$crskey => \@xlists});
+ if (ref($reformatted{$crskey}) eq 'ARRAY') {
+ my @show;
+ my @xlcodes = @{$reformatted{$crskey}};
+ for (my $i=0; $i<@xlcodes; $i++) {
+ push(@show,$xlcodes[$i].':'.$lcsecs[$i]);
+ }
+ if (@show) {
+ $shown = join(',',@show);
+ }
+ }
+ }
+ }
$disp_table .= &Apache::loncommon::start_data_table_row()."\n".
"$longtype{$item} | \n".
- "$enrollvar{$item} | \n";
+ "$shown | \n";
if (grep(/^\Q$item\E$/,@modifiable_params)) {
$disp_table .= ''.&mt('Yes').' | '."\n";
} else {
@@ -2538,7 +2563,7 @@ sub devalidate_remote_instcats {
}
$modified_dom = '';
}
- return;
+ return OK;
}
sub handler {