[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncoursequeueadmin.pm
raeburn
raeburn at source.lon-capa.org
Thu Dec 9 13:14:45 EST 2021
raeburn Thu Dec 9 18:14:45 2021 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface loncoursequeueadmin.pm
Log:
- For 2.11
Backport 1.61
Index: loncom/interface/loncoursequeueadmin.pm
diff -u loncom/interface/loncoursequeueadmin.pm:1.52.2.4 loncom/interface/loncoursequeueadmin.pm:1.52.2.5
--- loncom/interface/loncoursequeueadmin.pm:1.52.2.4 Sat Aug 22 01:23:54 2020
+++ loncom/interface/loncoursequeueadmin.pm Thu Dec 9 18:14:44 2021
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Utilities to administer domain course requests and course self-enroll requests
#
-# $Id: loncoursequeueadmin.pm,v 1.52.2.4 2020/08/22 01:23:54 raeburn Exp $
+# $Id: loncoursequeueadmin.pm,v 1.52.2.5 2021/12/09 18:14:44 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1656,7 +1656,7 @@
$owneremail = $emails{$email};
last if ($owneremail ne '');
}
- my %reqdetails = &build_batchcreatehash($dom,$context,$details,$owneremail,$domdefs);
+ my %reqdetails = &build_batchcreatehash($dom,$cnum,$context,$details,$owneremail,$domdefs);
my $cid = &LONCAPA::batchcreatecourse::build_course($dom,$cnum,'requestcourses',
\%reqdetails,$longroles,$logmsg,$newusermsg,$addresult,
$enrollcount,$output,$keysmsg,$ownerdom,$ownername,$cnum,$crstype,$coderef);
@@ -1677,7 +1677,7 @@
}
sub build_batchcreatehash {
- my ($dom,$context,$details,$owneremail,$domdefs) = @_;
+ my ($dom,$cnum,$context,$details,$owneremail,$domdefs) = @_;
my %batchhash;
my @items = qw{owner domain coursehome clonecrs clonedom datemode dateshift enrollstart enrollend accessstart accessend sections users uniquecode};
if ((ref($details) eq 'HASH') && (ref($domdefs) eq 'HASH')) {
@@ -1689,7 +1689,14 @@
if (ref($details->{'crosslists'}) eq 'HASH') {
foreach my $key (keys(%{$details->{'crosslists'}})) {
if (ref($details->{'crosslists'}->{$key}) eq 'HASH') {
- $batchhash{'crosslists'}{$key}{'inst'} = $details->{crosslists}->{$key}->{instcode}.$details->{crosslists}->{$key}->{instsec};
+ my $instsec = $details->{crosslists}->{$key}->{instsec};
+ $batchhash{'crosslists'}{$key}{'inst'} = $details->{crosslists}->{$key}->{instcode};
+ my $crskey = $cnum.':'.$batchhash{'crosslists'}{$key}{'inst'};
+ my %formatted = &Apache::lonnet::auto_instsec_reformat($dom,'clutter',
+ {$crskey => [$instsec]});
+ if (ref($formatted{$crskey}) eq 'ARRAY') {
+ $batchhash{'crosslists'}{$key}{'inst'} .= $formatted{$crskey}->[0];
+ }
$batchhash{'crosslists'}{$key}{'loncapa'} = $details->{crosslists}->{$key}->{loncapa};
}
}
More information about the LON-CAPA-cvs
mailing list