[LON-CAPA-cvs] cvs: loncom /interface lonpopulate.pm /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Sun Jan 2 23:56:27 EST 2022
raeburn Mon Jan 3 04:56:27 2022 EDT
Modified files:
/loncom/interface lonpopulate.pm
/loncom/lonnet/perl lonnet.pm
Log:
- Extend "zero enrollment failsafe" mechanism so it can also (optionally)
protect against unwanted drops if partial data retrieved from institutional
source for specific institutional section.
Index: loncom/interface/lonpopulate.pm
diff -u loncom/interface/lonpopulate.pm:1.90 loncom/interface/lonpopulate.pm:1.91
--- loncom/interface/lonpopulate.pm:1.90 Tue Dec 28 02:04:35 2021
+++ loncom/interface/lonpopulate.pm Mon Jan 3 04:56:27 2022
@@ -1,5 +1,5 @@
# automated enrollment configuration handler
-# $Id: lonpopulate.pm,v 1.90 2021/12/28 02:04:35 raeburn Exp $
+# $Id: lonpopulate.pm,v 1.91 2022/01/03 04:56:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3180,7 +3180,7 @@
&Apache::lonnet::get('environment',
['internal.coursecode','internal.sectionnums','internal.crosslistings',
'internal.authtype','internal.autharg','internal.showphoto','internal.defaultcredits',
- 'internal.autodropfailsafe','internal.textbook'],
+ 'internal.autodropfailsafe','internal.autodropfailsafetype','internal.textbook'],
$dom,$crs);
my $coursecode = $settings{'internal.coursecode'};
my $authtype = $settings{'internal.authtype'};
@@ -3202,6 +3202,10 @@
}
}
}
+ my $failsafetype = $settings{'internal.autodropfailsafetype'};
+ if ($failsafetype eq '') {
+ $failsafetype = $domdefaults{'failsafe'};
+ }
my $failsafe = $settings{'internal.autodropfailsafe'};
if ($failsafe eq '') {
$failsafe = $domdefaults{'autofailsafe'};
@@ -3240,7 +3244,7 @@
": ".$outcome);
}
if ($reply{$crs} > 0) {
- ($changecount,$response) = &LONCAPA::Enrollment::update_LC($dom,$crs,$updateadds,$updatedrops,$startaccess,$endaccess,$authtype,$autharg,$showcredits,$defaultcredits,$failsafe,\@allcourses,\%LC_code,\$logmsg,\$newusermsg,"updatenow",\%phototypes);
+ ($changecount,$response) = &LONCAPA::Enrollment::update_LC($dom,$crs,$updateadds,$updatedrops,$startaccess,$endaccess,$authtype,$autharg,$showcredits,$defaultcredits,$failsafe,$failsafetype,\@allcourses,\%LC_code,\$logmsg,\$newusermsg,"updatenow",\%phototypes);
} else {
$response = &mt('There was a problem retrieving institutional class list data for the course sections and crosslisted courses which contribute enrollment to this course.').' '.
&mt('No updates have been carried out, and the roster remains unchanged.');
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1476 loncom/lonnet/perl/lonnet.pm:1.1477
--- loncom/lonnet/perl/lonnet.pm:1.1476 Fri Dec 24 11:07:43 2021
+++ loncom/lonnet/perl/lonnet.pm Mon Jan 3 04:56:27 2022
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1476 2021/12/24 11:07:43 raeburn Exp $
+# $Id: lonnet.pm,v 1.1477 2022/01/03 04:56:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2774,6 +2774,7 @@
}
if (ref($domconfig{'autoenroll'}) eq 'HASH') {
$domdefaults{'autofailsafe'} = $domconfig{'autoenroll'}{'autofailsafe'};
+ $domdefaults{'failsafe'} = $domconfig{'autoenroll'}{'failsafe'};
}
if (ref($domconfig{'helpsettings'}) eq 'HASH') {
$domdefaults{'submitbugs'} = $domconfig{'helpsettings'}{'submitbugs'};
More information about the LON-CAPA-cvs
mailing list