--- loncom/interface/lonmodifycourse.pm 2019/07/25 20:23:52 1.95 +++ loncom/interface/lonmodifycourse.pm 2021/06/15 20:52:26 1.96 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.95 2019/07/25 20:23:52 raeburn Exp $ +# $Id: lonmodifycourse.pm,v 1.96 2021/06/15 20:52:26 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -684,9 +684,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 {