version 1.5, 2000/12/28 16:32:10
|
version 1.8, 2001/01/01 17:30:00
|
Line 14
|
Line 14
|
# 11/20,11/21,11/22,11/23,11/24,11/25,11/27,11/28, |
# 11/20,11/21,11/22,11/23,11/24,11/25,11/27,11/28, |
# 12/08,12/12 Gerd Kortemeyer) |
# 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; |
package Apache::londropadd; |
|
|
Line 349 LON-CAPA domain: <input type=text size=1
|
Line 350 LON-CAPA domain: <input type=text size=1
|
<h3>Full Update</h3> |
<h3>Full Update</h3> |
<input type=checkbox name=fullup value=yes> Full update |
<input type=checkbox name=fullup value=yes> Full update |
(also dropping students)<p> |
(also dropping students)<p> |
<input type=button onClick="verify(this.form)" value="Submit Selection"> |
<input type=button onClick="verify(this.form)" value="Update Courselist"><br> |
|
Note: for large courses, this operation might be time consuming. |
ENDPICK |
ENDPICK |
} elsif ($ENV{'form.enroll'}) { |
} elsif ($ENV{'form.enroll'}) { |
} elsif ($ENV{'form.drop'}) { |
} elsif ($ENV{'form.drop'}) { |
Line 391 ENDPICK
|
Line 393 ENDPICK
|
} |
} |
unless (($domain=~/\W/) || ($amode eq '')) { |
unless (($domain=~/\W/) || ($amode eq '')) { |
$r->print('<h3>Enrolling Students</h3>'); |
$r->print('<h3>Enrolling Students</h3>'); |
my $count=1; |
my $count=0; |
|
my $flushc=0; |
|
my %student=(); |
# ----------------------------------------------------------- Get new classlist |
# ----------------------------------------------------------- Get new classlist |
my @studentdata=(); |
my @studentdata=(); |
{ |
{ |
Line 464 ENDPICK
|
Line 468 ENDPICK
|
unless ($reply eq 'ok') { |
unless ($reply eq 'ok') { |
$r->print( |
$r->print( |
"<p><b>Error enrolling $username: $reply</b><p>"); |
"<p><b>Error enrolling $username: $reply</b><p>"); |
} |
} else { |
|
$count++; $flushc++; |
|
$student{$username}=1; |
|
$r->print('. '); |
|
if ($flushc>15) { |
|
$r->rflush; |
|
$flushc=0; |
|
} |
|
} |
} else { |
} else { |
$r->print( |
$r->print( |
"<p><b>No password for $username</b><p>"); |
"<p><b>No password for $username</b><p>"); |
Line 472 ENDPICK
|
Line 484 ENDPICK
|
} |
} |
} |
} |
} @studentdata; |
} @studentdata; |
|
$r->print('<p>Processed Students: '.$count); |
# --------------------------------------------------------------- Drop students |
# --------------------------------------------------------------- Drop students |
if ($ENV{'form.fullup'} eq 'yes') { |
if ($ENV{'form.fullup'} eq 'yes') { |
$r->print('<h3>Dropping Students</h3>'); |
$r->print('<h3>Dropping Students</h3>'); |
Line 484 ENDPICK
|
Line 497 ENDPICK
|
my %currentlist=(); |
my %currentlist=(); |
my $now=time; |
my $now=time; |
unless ($classlst=~/^error\:/) { |
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 { |
} else { |
$r->print( |
$r->print( |
'<font color=red><h3>Could not access classlist: '.$classlst. |
'<font color=red><h3>Could not access classlist: '.$classlst. |