version 1.71, 2003/07/02 19:52:56
|
version 1.72, 2003/07/03 19:26:20
|
Line 1466 sub upfile_drop_add {
|
Line 1466 sub upfile_drop_add {
|
####################################### |
####################################### |
## Enroll Students ## |
## Enroll Students ## |
####################################### |
####################################### |
$r->print('<h3>Enrolling Students</h3>'); |
$r->print('<h3>Enrolling Students</h3>'."\n".'<p>'); |
my $count=0; |
my $count=0; |
my $flushc=0; |
my $flushc=0; |
my %student=(); |
my %student=(); |
Line 1495 sub upfile_drop_add {
|
Line 1495 sub upfile_drop_add {
|
} |
} |
} |
} |
if ($entries{$fields{'username'}}=~/\W/) { |
if ($entries{$fields{'username'}}=~/\W/) { |
$r->print('<p><b>Unacceptable username: '. |
$r->print('<br /><b>Unacceptable username: '. |
$entries{$fields{'username'}}.' for user '. |
$entries{$fields{'username'}}.' for user '. |
$fname.' '.$mname.' '.$lname.' '.$gen.'</b><p>'); |
$fname.' '.$mname.' '.$lname.' '.$gen.'</b>'); |
} else { |
} else { |
# determine section number |
# determine section number |
my $sec=''; |
my $sec=''; |
Line 1539 sub upfile_drop_add {
|
Line 1539 sub upfile_drop_add {
|
$fname,$mname,$lname,$gen,$sec,$enddate, |
$fname,$mname,$lname,$gen,$sec,$enddate, |
$startdate,$ENV{'form.forceid'},$desiredhost); |
$startdate,$ENV{'form.forceid'},$desiredhost); |
if ($reply ne 'ok') { |
if ($reply ne 'ok') { |
$r->print('<p><b>'. |
$reply =~ s/^error://; |
'Error enrolling '.$username.': '. |
$r->print('<br /><b>'.$username.'</b>:'. |
$reply.'</b></p>'); |
' Unable to enroll: '.$reply); |
} else { |
} else { |
$count++; $flushc++; |
$count++; $flushc++; |
$student{$username}=1; |
$student{$username}=1; |
Line 1552 sub upfile_drop_add {
|
Line 1552 sub upfile_drop_add {
|
} |
} |
} |
} |
} else { |
} else { |
$r->print("<p><b>No password for $username</b><p>"); |
$r->print('<br /><b>'.$username.'</b>:'. |
|
' Unable to enroll: No password specified.'); |
} |
} |
} |
} |
} |
} |
} # end of foreach (@studentdata) |
} # end of foreach (@studentdata) |
$r->print('<p>Processed Students: '.$count.'</p>'); |
$r->print('</p><p>Processed Students: '.$count.'</p>'); |
$r->print("<p>If active, the new role will be available when the ". |
$r->print("<p>If active, the new role will be available when the ". |
"students next log in to LON-CAPA.</p>"); |
"students next log in to LON-CAPA.</p>"); |
##################################### |
##################################### |