--- loncom/interface/Attic/londropadd.pm 2000/12/28 19:56:31 1.6 +++ loncom/interface/Attic/londropadd.pm 2001/01/15 14:51:18 1.9 @@ -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,01/15 Gerd Kortemeyer package Apache::londropadd; @@ -79,6 +80,9 @@ ENDUPFORM # ------------------------------------------------------------------- Phase two if ($ENV{'form.phase'} eq 'two') { if ($ENV{'form.fileupload'}) { + $ENV{'form.upfile'}=~s/\r/\n/gs; + $ENV{'form.upfile'}=~s/\f/\n/gs; + $ENV{'form.upfile'}=~s/\n+/\n/gs; my $datatoken=$ENV{'user.name'}.'_'.$ENV{'user.domain'}. '_enroll_'.$ENV{'request.course.id'}.'_'.time.'_'.$$; { @@ -392,7 +396,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=(); { @@ -466,7 +472,13 @@ ENDPICK $r->print( "

Error enrolling $username: $reply

"); } else { + $count++; $flushc++; + $student{$username}=1; $r->print('. '); + if ($flushc>15) { + $r->rflush; + $flushc=0; + } } } else { $r->print( @@ -475,6 +487,7 @@ ENDPICK } } } @studentdata; + $r->print('

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

Dropping Students

'); @@ -487,6 +500,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.