[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmodifycourse.pm
raeburn
raeburn at source.lon-capa.org
Sun Jun 20 13:27:03 EDT 2021
raeburn Sun Jun 20 17:27:03 2021 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface lonmodifycourse.pm
Log:
- For 2.11
Backport 1.96
Index: loncom/interface/lonmodifycourse.pm
diff -u loncom/interface/lonmodifycourse.pm:1.79.2.8 loncom/interface/lonmodifycourse.pm:1.79.2.9
--- loncom/interface/lonmodifycourse.pm:1.79.2.8 Tue Aug 27 15:34:34 2019
+++ loncom/interface/lonmodifycourse.pm Sun Jun 20 17:27:03 2021
@@ -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.9 2021/06/20 17:27:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -664,9 +664,34 @@
"<th>$lt{'dcon'}</th>\n".
&Apache::loncommon::end_data_table_header_row()."\n";
foreach my $item (@items) {
+ my $shown = $enrollvar{$item};
+ if ($item eq 'crosslistings') {
+ my (@xlists, at 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(',', at show);
+ }
+ }
+ }
+ }
$disp_table .= &Apache::loncommon::start_data_table_row()."\n".
"<td><b>$longtype{$item}</b></td>\n".
- "<td>$enrollvar{$item}</td>\n";
+ "<td>$shown</td>\n";
if (grep(/^\Q$item\E$/, at modifiable_params)) {
$disp_table .= '<td align="right">'.&mt('Yes').'</td>'."\n";
} else {
More information about the LON-CAPA-cvs
mailing list