Diff for /loncom/enrollment/Enrollment.pm between versions 1.49 and 1.52

version 1.49, 2016/07/24 14:35:15 version 1.52, 2017/10/27 13:35:37
Line 329  sub update_LC { Line 329  sub update_LC {
                     }                      }
                 }                  }
 # Check for institutional section change  # Check for institutional section change
                 if ($$currlist{$uname}[$instidx] ne $instsec) {                  if (($$currlist{$uname}[$instidx] ne $instsec) && (!$added)) {
                     my $modify_instsec_result =                      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);                          &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/) {                      if ($modify_instsec_result =~ /^ok/) {
Line 443  sub update_LC { Line 443  sub update_LC {
 # Check for changed usernames by checking studentIDs  # Check for changed usernames by checking studentIDs
                     if (grep/^$$currlist{$uname}[ $stuid ]$/,@allINids) {                      if (grep/^$$currlist{$uname}[ $stuid ]$/,@allINids) {
                         foreach my $match (@{$unameFromINid{$$currlist{$uname}[ $stuid ]}} ) {                          foreach my $match (@{$unameFromINid{$$currlist{$uname}[ $stuid ]}} ) {
                             $$logmsg .= &mt('A possible change in username has been detected for a student enrolled in this course.').' '.&mt('The existing LON-CAPA classlist contains user: [_1] and student/employee ID: [_2].',$uname,$$currlist{$uname}[ $place{studentID} ]).' '.&mt('This username has been dropped from the institutional classlist, but the same student/employee ID is used for user: [_1] who still appears in the institutional classlist.',$match).' '.&mt('You may need to move the student data files for user: [_1] to [_2]',$uname,$match).' '.&mt('Because of this, user [_1] has not been dropped from the course.',$uname).$linefeed;                              $$logmsg .= &mt('A possible change in username has been detected for a student enrolled in this course.').' '.&mt('The existing LON-CAPA classlist contains user: [_1] and student/employee ID: [_2].',$uname,$$currlist{$uname}[ $stuid ]).' '.&mt('This username has been dropped from the institutional classlist, but the same student/employee ID is used for user: [_1] who still appears in the institutional classlist.',$match).' '.&mt('You may need to move the student data files for user: [_1] to [_2]',$uname,$match).' '.&mt('Because of this, user [_1] has not been dropped from the course.',$uname).$linefeed;
                             push @saved,$uname;                              push @saved,$uname;
                         }                          }
                     } elsif (@saved == 0) {                      } elsif (@saved == 0) {
Line 479  sub update_LC { Line 479  sub update_LC {
                     if ($autofailsafe < scalar(@{$delaydrops{$class}})) {                      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);                          $$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") {                          if ($context eq "updatenow") {
                             $$logmsg .= join('<br />',@{$delaydrops{$class}}).$linefeed;                               $$logmsg .= '<br />'.join('<br />',@{$delaydrops{$class}}).$linefeed; 
                         } elsif ($context eq "automated") {                          } elsif ($context eq "automated") {
                             $$logmsg .= join($linefeed,@{$delaydrops{$class}}).$linefeed;                              $$logmsg .= $linefeed.join($linefeed,@{$delaydrops{$class}}).$linefeed;
                         }                          }
                     } else {                      } else {
                         foreach my $uname (@{$delaydrops{$class}}) {                          foreach my $uname (@{$delaydrops{$class}}) {

Removed from v.1.49  
changed lines
  Added in v.1.52


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>