--- loncom/enrollment/Enrollment.pm 2004/08/23 17:07:27 1.17 +++ loncom/enrollment/Enrollment.pm 2004/09/13 16:36:34 1.18 @@ -1,5 +1,5 @@ # Automated Enrollment manager -# $Id: Enrollment.pm,v 1.17 2004/08/23 17:07:27 raeburn Exp $ +# $Id: Enrollment.pm,v 1.18 2004/09/13 16:36:34 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -51,6 +51,7 @@ sub update_LC { my @localstudents = (); my @futurestudents = (); my @activestudents = (); + my @excludedstudents = (); my $currlist; foreach my $uname (keys %{$roster} ) { if ($uname =~ m/^(.+):$dom$/) { @@ -62,6 +63,8 @@ sub update_LC { push @futurestudents, $1; @{$$currlist{$1}} = @{$$roster{$uname}}; push @localstudents, $1; + } elsif ($$roster{$uname}[$lockedtype] == 1) { + push @excludedstudents, $1; } } } @@ -124,7 +127,9 @@ sub update_LC { # Check for multiple sections for a single student my @okusers = (); foreach my $uname (@reg_students) { - if (@{$allenrolled{$uname}} > 1) { + if (grep/^$uname$/,@excludedstudents) { + $$logmsg .= "No re-enrollment for $uname - user was previously manually unenrolled and locked.".$linefeed; + } elsif (@{$allenrolled{$uname}} > 1) { my @sections = (); my $saved; for (my $i=0; $i<@{$allenrolled{$uname}}; $i++) {