--- loncom/enrollment/Enrollment.pm 2016/07/24 14:35:15 1.49
+++ loncom/enrollment/Enrollment.pm 2017/09/18 14:21:45 1.51
@@ -1,5 +1,5 @@
# Automated Enrollment manager
-# $Id: Enrollment.pm,v 1.49 2016/07/24 14:35:15 raeburn Exp $
+# $Id: Enrollment.pm,v 1.51 2017/09/18 14:21:45 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -329,7 +329,7 @@ sub update_LC {
}
}
# Check for institutional section change
- if ($$currlist{$uname}[$instidx] ne $instsec) {
+ if (($$currlist{$uname}[$instidx] ne $instsec) && (!$added)) {
my $modify_instsec_result =
&Apache::lonnet::modify_student_enrollment($dom,$uname,undef,undef,undef,undef,undef,$stuinfo[ $place{groupID} ],$enddate,$startdate,'auto','',$cid,'',$context,$credits,$instsec);
if ($modify_instsec_result =~ /^ok/) {
@@ -479,9 +479,9 @@ sub update_LC {
if ($autofailsafe < scalar(@{$delaydrops{$class}})) {
$$logmsg .= &mt('The following students were not expired from the old section [_1] because the enrollment count retrieved for that institutional section was zero, and the number of students with roles to expire exceeded the failsafe threshold of [_2]:',$class,$autofailsafe);
if ($context eq "updatenow") {
- $$logmsg .= join('
',@{$delaydrops{$class}}).$linefeed;
+ $$logmsg .= '
'.join('
',@{$delaydrops{$class}}).$linefeed;
} elsif ($context eq "automated") {
- $$logmsg .= join($linefeed,@{$delaydrops{$class}}).$linefeed;
+ $$logmsg .= $linefeed.join($linefeed,@{$delaydrops{$class}}).$linefeed;
}
} else {
foreach my $uname (@{$delaydrops{$class}}) {