--- loncom/interface/Attic/londropadd.pm 2000/12/28 16:32:10 1.5 +++ loncom/interface/Attic/londropadd.pm 2001/01/01 17:30:00 1.8 @@ -14,7 +14,8 @@ # 11/20,11/21,11/22,11/23,11/24,11/25,11/27,11/28, # 12/08,12/12 Gerd Kortemeyer) # -# 12/26,12/27,12/28 Gerd Kortemeyer +# 12/26,12/27,12/28, +# 01/01/01 Gerd Kortemeyer package Apache::londropadd; @@ -349,7 +350,8 @@ LON-CAPA domain: Full Update Full update (also dropping students)

- +
+Note: for large courses, this operation might be time consuming. ENDPICK } elsif ($ENV{'form.enroll'}) { } elsif ($ENV{'form.drop'}) { @@ -391,7 +393,9 @@ ENDPICK } unless (($domain=~/\W/) || ($amode eq '')) { $r->print('

Enrolling Students

'); - my $count=1; + my $count=0; + my $flushc=0; + my %student=(); # ----------------------------------------------------------- Get new classlist my @studentdata=(); { @@ -464,7 +468,15 @@ ENDPICK unless ($reply eq 'ok') { $r->print( "

Error enrolling $username: $reply

"); - } + } else { + $count++; $flushc++; + $student{$username}=1; + $r->print('. '); + if ($flushc>15) { + $r->rflush; + $flushc=0; + } + } } else { $r->print( "

No password for $username

"); @@ -472,6 +484,7 @@ ENDPICK } } } @studentdata; + $r->print('

Processed Students: '.$count); # --------------------------------------------------------------- Drop students if ($ENV{'form.fullup'} eq 'yes') { $r->print('

Dropping Students

'); @@ -484,6 +497,17 @@ ENDPICK my %currentlist=(); my $now=time; unless ($classlst=~/^error\:/) { + map { + my ($name,$value)=split(/\=/,$_); + my ($end,$start)=split(/\:/, + &Apache::lonnet::unescape($value)); + my $active=1; + if (($end) && ($now>$end)) { $active=0; } + if ($active) { + $currentlist{&Apache::lonnet::unescape($name)}=1; + } + } split(/\&/,$classlst); + } else { $r->print( '

Could not access classlist: '.$classlst.