version 1.22, 2002/04/04 17:32:45
|
version 1.23, 2002/04/04 20:41:17
|
Line 227 sub menu_phase_one {
|
Line 227 sub menu_phase_one {
|
ENDUPFORM |
ENDUPFORM |
} |
} |
|
|
# ======================================================= Menu Phase Two Upload |
|
|
|
sub menu_phase_two_upload { |
|
my $r=shift; |
|
|
|
my $datatoken=&upfile_store($r); |
|
|
|
my @records=&upfile_record_sep(); |
|
my $total=$#records; |
|
my $distotal=$total+1; |
|
|
|
$ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/; |
|
my $krbdefdom=$1; |
|
$krbdefdom=~tr/a-z/A-Z/; |
|
|
|
my $today=time; |
|
my $halfyear=$today+15552000; |
|
|
|
my $defdom=$r->dir_config('lonDefDomain'); |
|
|
|
|
sub phase_two_header { |
|
my ($r,$datatoken,$distotal,$krbdefdom)=@_; |
$r->print(<<ENDPICK); |
$r->print(<<ENDPICK); |
<input type=hidden name=phase value=three> |
<input type=hidden name=phase value=three> |
<input type=hidden name=datatoken value="$datatoken"> |
<input type=hidden name=datatoken value="$datatoken"> |
Line 425 function clickint(vf) {
|
Line 408 function clickint(vf) {
|
</script> |
</script> |
<table border=2><tr><th>Field</th><th>Samples</th></tr> |
<table border=2><tr><th>Field</th><th>Samples</th></tr> |
ENDPICK |
ENDPICK |
my %sone; my %stwo; my %sthree; |
} |
my $i=0; |
|
|
|
if ($total>=0) { |
sub phase_two_end { |
%sone=&record_sep($records[0]); |
my ($r,$i,$keyfields,$defdom,$today,$halfyear)=@_; |
if ($total>=1) { |
$r->print(<<ENDPICK); |
%stwo=&record_sep($records[1]); |
|
|
|
} |
|
if ($total>=2) { |
|
%sthree=&record_sep($records[2]); |
|
} |
|
foreach (sort keys %sone) { |
|
$r->print('<tr><td><select name=f'.$i. |
|
' onChange="flip(this.form,'.$i.');">'); |
|
foreach ('none: ','username:Username', |
|
'names:Last Name, First Names', |
|
'fname:First Name','mname:Middle Names/Initials', |
|
'lname:Last Name','gen:Generation', |
|
'id:ID/Student Number','sec:Group/Section', |
|
'ipwd:Initial Password') { |
|
my ($value,$display)=split(/\:/,$_); |
|
$r->print('<option value='.$value.'>'.$display. |
|
'</option>'); |
|
} |
|
$r->print('</select></td><td>'); |
|
if (defined($sone{$_})) { |
|
$r->print($sone{$_}."</br>\n"); |
|
} |
|
if (defined($stwo{$_})) { |
|
$r->print($stwo{$_}."</br>\n"); |
|
} |
|
if (defined($sthree{$_})) { |
|
$r->print($sthree{$_}."</br>\n"); |
|
} |
|
$r->print('</td></tr>'); |
|
$i++; |
|
} |
|
$i--; |
|
} |
|
my $keyfields=join(',',sort keys %sone); |
|
$r->print(<<ENDPICK); |
|
</table> |
</table> |
<input type=hidden name=nfields value=$i> |
<input type=hidden name=nfields value=$i> |
<input type=hidden name=keyfields value="$keyfields"> |
<input type=hidden name=keyfields value="$keyfields"> |
Line 513 Disable ID/Student Number Safeguard and
|
Line 459 Disable ID/Student Number Safeguard and
|
Note: for large courses, this operation might be time consuming. |
Note: for large courses, this operation might be time consuming. |
ENDPICK |
ENDPICK |
} |
} |
|
# ======================================================= Menu Phase Two Upload |
|
|
|
sub menu_phase_two_upload { |
|
my $r=shift; |
|
|
|
my $datatoken=&upfile_store($r); |
|
|
|
my @records=&upfile_record_sep(); |
|
my $total=$#records; |
|
my $distotal=$total+1; |
|
|
|
$ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/; |
|
my $krbdefdom=$1; |
|
$krbdefdom=~tr/a-z/A-Z/; |
|
|
|
my $today=time; |
|
my $halfyear=$today+15552000; |
|
|
|
my $defdom=$r->dir_config('lonDefDomain'); |
|
|
|
&phase_two_header($r,$datatoken,$distotal,$krbdefdom); |
|
|
|
my %sone; my %stwo; my %sthree; |
|
my $i=0; |
|
|
|
if ($total>=0) { |
|
%sone=&record_sep($records[0]); |
|
if ($total>=1) { |
|
%stwo=&record_sep($records[1]); |
|
} |
|
if ($total>=2) { |
|
%sthree=&record_sep($records[2]); |
|
} |
|
foreach (sort keys %sone) { |
|
$r->print('<tr><td><select name=f'.$i. |
|
' onChange="flip(this.form,'.$i.');">'); |
|
foreach ('none: ','username:Username', |
|
'names:Last Name, First Names', |
|
'fname:First Name','mname:Middle Names/Initials', |
|
'lname:Last Name','gen:Generation', |
|
'id:ID/Student Number','sec:Group/Section', |
|
'ipwd:Initial Password') { |
|
my ($value,$display)=split(/\:/,$_); |
|
$r->print('<option value='.$value.'>'.$display. |
|
'</option>'); |
|
} |
|
$r->print('</select></td><td>'); |
|
if (defined($sone{$_})) { |
|
$r->print($sone{$_}."</br>\n"); |
|
} |
|
if (defined($stwo{$_})) { |
|
$r->print($stwo{$_}."</br>\n"); |
|
} |
|
if (defined($sthree{$_})) { |
|
$r->print($sthree{$_}."</br>\n"); |
|
} |
|
$r->print('</td></tr>'); |
|
$i++; |
|
} |
|
$i--; |
|
} |
|
my $keyfields=join(',',sort keys %sone); |
|
|
|
&phase_two_end($r,$i,$keyfields,$defdom,$today,$halfyear); |
|
} |
|
|
# ======================================================= Enroll single student |
# ======================================================= Enroll single student |
|
|