version 1.114, 2004/06/17 18:31:24
|
version 1.119, 2004/10/16 00:46:58
|
Line 309 END
|
Line 309 END
|
return; |
return; |
} |
} |
// alert('current.radiovalue = '+current.radiovalue); |
// alert('current.radiovalue = '+current.radiovalue); |
if (current.radiovalue == null || current.radiovalue == 'nochange') { |
if (current.radiovalue == null || current.radiovalue == '' || current.radiovalue == 'nochange') { |
// They did not check any of the login radiobuttons. |
// They did not check any of the login radiobuttons. |
alert('$alert{'authen'}'); |
alert('$alert{'authen'}'); |
return; |
return; |
Line 924 sub print_enroll_single_student_form {
|
Line 924 sub print_enroll_single_student_form {
|
# |
# |
my $username = $ENV{'form.cuname'}; |
my $username = $ENV{'form.cuname'}; |
my $domain = $ENV{'form.cudomain'}; |
my $domain = $ENV{'form.cudomain'}; |
|
$username=~s/[\W|_]//gs; |
|
$domain=~s/[\W|_]//gs; |
my $home = &Apache::lonnet::homeserver($username,$domain); |
my $home = &Apache::lonnet::homeserver($username,$domain); |
# $new_user flags whether we are creating a new user or using an old one |
# $new_user flags whether we are creating a new user or using an old one |
my $new_user = 1; |
my $new_user = 1; |
Line 1231 END
|
Line 1233 END
|
'sec' => "section", |
'sec' => "section", |
'start' => "start date", |
'start' => "start date", |
'end' => "end date", |
'end' => "end date", |
'type' => "enroll type", |
'type' => "enroll type/action" |
'chan' => "change" |
|
); |
); |
unless ($mode eq 'autoenroll') { |
unless ($mode eq 'autoenroll') { |
$r->print(<<END); |
$r->print(<<END); |
Line 1240 END
|
Line 1241 END
|
<input type="hidden" name="sdom" value="" /> |
<input type="hidden" name="sdom" value="" /> |
END |
END |
} |
} |
$r->print(<<END); |
$r->print(" |
<p> |
<p> |
<table border=2> |
<table border=2> |
<tr><th>Count |
<tr> |
</th><th> |
"); |
|
if ($mode eq 'autoenroll') { |
|
$r->print(" |
|
<th><a href=\"javascript:document.studentform.sortby.value='type';document.studentform.submit();\">$lt{'type'}</a></th> |
|
"); |
|
} else { |
|
$r->print(" |
|
<th>Count</th> |
|
"); |
|
} |
|
$r->print(<<END); |
|
<th> |
<a href="javascript:document.studentform.sortby.value='username';document.studentform.submit();">$lt{'usrn'}</a> |
<a href="javascript:document.studentform.sortby.value='username';document.studentform.submit();">$lt{'usrn'}</a> |
</th><th> |
</th><th> |
<a href="javascript:document.studentform.sortby.value='domain';document.studentform.submit();">$lt{'dom'}</a> |
<a href="javascript:document.studentform.sortby.value='domain';document.studentform.submit();">$lt{'dom'}</a> |
Line 1259 END
|
Line 1271 END
|
</th><th> |
</th><th> |
<a href="javascript:document.studentform.sortby.value='end';document.studentform.submit();">$lt{'end'}</a> |
<a href="javascript:document.studentform.sortby.value='end';document.studentform.submit();">$lt{'end'}</a> |
</th> |
</th> |
|
</tr> |
END |
END |
if ($mode eq 'autoenroll') { |
|
$r->print(" <th> |
|
<a href=\"javascript:document.studentform.sortby.value='type';document.studentform.submit();\">$lt{'type'}</a> |
|
</th><th> |
|
$lt{'chan'}?</th>"); |
|
} |
|
$r->print(" |
|
</tr> |
|
"); |
|
} elsif ($mode eq 'csv') { |
} elsif ($mode eq 'csv') { |
# |
# |
# Open a file |
# Open a file |
Line 1337 END
|
Line 1341 END
|
lc($classlist->{$a}->[$third]) cmp lc($classlist->{$b}->[$third]) |
lc($classlist->{$a}->[$third]) cmp lc($classlist->{$b}->[$third]) |
} (keys(%$classlist)); |
} (keys(%$classlist)); |
my $studentcount = 0; |
my $studentcount = 0; |
|
my $autocount = 0; |
|
my $manualcount = 0; |
|
my $unlockcount = 0; |
|
my $lockcount = 0; |
foreach my $student (@Sorted_Students) { |
foreach my $student (@Sorted_Students) { |
my $sdata = $classlist->{$student}; |
my $sdata = $classlist->{$student}; |
my $username = $sdata->[$index{'username'}]; |
my $username = $sdata->[$index{'username'}]; |
Line 1347 END
|
Line 1355 END
|
my $status = $sdata->[$index{'status'}]; |
my $status = $sdata->[$index{'status'}]; |
my $start = $sdata->[$index{'start'}]; |
my $start = $sdata->[$index{'start'}]; |
my $end = $sdata->[$index{'end'}]; |
my $end = $sdata->[$index{'end'}]; |
my $type = $sdata->[$index{'type'}]; |
my $type = $sdata->[$index{'type'}]; |
next if (($statusmode ne 'Any') && ($status ne $statusmode)); |
next if (($statusmode ne 'Any') && ($status ne $statusmode)); |
if ($mode eq 'view' || $mode eq 'html' || $mode eq 'autoenroll') { |
if ($mode eq 'view' || $mode eq 'html' || $mode eq 'autoenroll') { |
if (! defined($start) || $start == 0) { |
if (! defined($start) || $start == 0) { |
Line 1360 END
|
Line 1368 END
|
} else { |
} else { |
$end = &Apache::lonlocal::locallocaltime($end); |
$end = &Apache::lonlocal::locallocaltime($end); |
} |
} |
$r->print("<tr>\n <td>".(++$studentcount)."</td><td>\n "); |
$r->print("<tr>\n "); |
|
if ($mode eq 'autoenroll') { |
|
my $lockedtype = $sdata->[$index{'lockedtype'}]; |
|
$studentcount++; |
|
my $cellentry; |
|
if ($type eq 'auto') { |
|
$cellentry = '<b>'.&mt('auto').'</b> <input type="checkbox" name="chgauto" value="'.$username.':'.$domain.'" /> Change'; |
|
$autocount ++; |
|
} else { |
|
$cellentry = '<table border="0" cellspacing="0"><tr><td rowspan="2"><b>'.&mt('manual').'</b></td><td><nobr><input type="checkbox" name="chgmanual" value="'.$username.':'.$domain.'" /> Change</nobr></td></tr><tr><td><nobr>'; |
|
$manualcount ++; |
|
if ($lockedtype) { |
|
$cellentry .= '<input type="checkbox" name="unlockchg" value="'.$username.':'.$domain.'" /> '.&mt('Unlock'); |
|
$unlockcount ++; |
|
} else { |
|
$cellentry .= '<input type="checkbox" name="lockchg" value="'.$username.':'.$domain.'" /> '.&mt('Lock'); |
|
$lockcount ++; |
|
} |
|
$cellentry .= '</nobr></td></tr></table>'; |
|
} |
|
$r->print("<td>$cellentry<td>\n "); |
|
} else { |
|
$r->print("<td>".(++$studentcount)."</td><td>\n "); |
|
} |
if ($linkto eq 'nothing') { |
if ($linkto eq 'nothing') { |
$r->print($username); |
$r->print($username); |
} elsif ($linkto eq 'aboutme') { |
} elsif ($linkto eq 'aboutme') { |
Line 1384 END
|
Line 1415 END
|
<td>$section</td> |
<td>$section</td> |
<td>$start</td> |
<td>$start</td> |
<td>$end</td> |
<td>$end</td> |
|
</tr> |
END |
END |
if ($mode eq 'autoenroll') { |
|
my $longtype = &mt('manual').' '; |
|
if ($type eq 'auto') { |
|
$longtype = &mt('auto').' '; |
|
} |
|
$r->print("<td><b>$longtype</b></td><td><input type=\"checkbox\" name=\"switch:$username:$domain\" /></td>"); |
|
} |
|
$r->print(" |
|
</tr> |
|
"); |
|
} elsif ($mode eq 'csv') { |
} elsif ($mode eq 'csv') { |
next if (! defined($CSVfile)); |
next if (! defined($CSVfile)); |
# no need to bother with $linkto |
# no need to bother with $linkto |
Line 1443 END
|
Line 1465 END
|
$r->rflush(); |
$r->rflush(); |
} |
} |
if ($mode eq 'autoenroll') { |
if ($mode eq 'autoenroll') { |
return $studentcount; |
return ($studentcount,$autocount,$manualcount,$lockcount,$unlockcount); |
} |
} |
|
return; |
} |
} |
|
|
|
|
Line 2268 sub handler {
|
Line 2291 sub handler {
|
({href=>'/adm/dropadd?action=upload&state=', |
({href=>'/adm/dropadd?action=upload&state=', |
text=>"Upload Classlist"}); |
text=>"Upload Classlist"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(undef,'Upload Classlist')); |
(undef,'Upload Classlist','Course_Create_Class_List')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_first_courselist_upload_form($r); |
&print_first_courselist_upload_form($r); |
} elsif ($ENV{'form.state'} eq 'got_file') { |
} elsif ($ENV{'form.state'} eq 'got_file') { |
Line 2287 sub handler {
|
Line 2310 sub handler {
|
({href=>'/adm/dropadd?action=drop', |
({href=>'/adm/dropadd?action=drop', |
text=>"Drop Students"}); |
text=>"Drop Students"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(undef,'Drop Students')); |
(undef,'Drop Students','Course_Drop_Student')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_drop_menu($r); |
&print_drop_menu($r); |
} elsif ($ENV{'form.state'} eq 'done') { |
} elsif ($ENV{'form.state'} eq 'done') { |
Line 2300 sub handler {
|
Line 2323 sub handler {
|
({href=>'/adm/dropadd?action=enrollstudent', |
({href=>'/adm/dropadd?action=enrollstudent', |
text=>"Enroll Student"}); |
text=>"Enroll Student"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(undef,'Enroll Student')); |
(undef,'Enroll Student','Course_Add_Student')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&get_student_username_domain_form($r); |
&get_student_username_domain_form($r); |
} elsif ($ENV{'form.state'} eq 'gotusername') { |
} elsif ($ENV{'form.state'} eq 'gotusername') { |
Line 2315 sub handler {
|
Line 2338 sub handler {
|
({href=>'/adm/dropadd?action=classlist', |
({href=>'/adm/dropadd?action=classlist', |
text=>"View Classlist"}); |
text=>"View Classlist"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(undef,'View Classlist')); |
(undef,'View Classlist','Course_View_Class_List')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_html_classlist($r,undef); |
&print_html_classlist($r,undef); |
} elsif ($ENV{'form.state'} eq 'csv') { |
} elsif ($ENV{'form.state'} eq 'csv') { |
Line 2330 sub handler {
|
Line 2353 sub handler {
|
({href=>'/adm/dropadd?action=modifystudent', |
({href=>'/adm/dropadd?action=modifystudent', |
text=>"Modify Student Data"}); |
text=>"Modify Student Data"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(undef,'Modify Student Data')); |
(undef,'Modify Student Data','Course_Modify_Student_Data')); |
if (! exists($ENV{'form.state'})) { |
if (! exists($ENV{'form.state'})) { |
&print_html_classlist($r); |
&print_html_classlist($r); |
} elsif ($ENV{'form.state'} eq 'selected') { |
} elsif ($ENV{'form.state'} eq 'selected') { |