--- loncom/interface/Attic/londropadd.pm 2000/12/28 16:32:10 1.5 +++ 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.'_'.$$; { @@ -349,7 +353,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 +396,9 @@ ENDPICK
}
unless (($domain=~/\W/) || ($amode eq '')) {
$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 +487,7 @@ ENDPICK } } } @studentdata; + $r->print('
Processed Students: '.$count); # --------------------------------------------------------------- Drop students if ($ENV{'form.fullup'} eq 'yes') { $r->print('