version 1.81, 2003/08/14 14:16:42
|
version 1.82, 2003/08/14 16:08:46
|
Line 32
|
Line 32
|
# (TeX Content Handler |
# (TeX Content Handler |
# |
# |
############################################################### |
############################################################### |
############################################################### |
############################################################## |
|
|
package Apache::londropadd; |
package Apache::londropadd; |
|
|
Line 185 sub print_upload_manager_header {
|
Line 185 sub print_upload_manager_header {
|
$javascript=&upload_manager_javascript_forward_associate(); |
$javascript=&upload_manager_javascript_forward_associate(); |
} |
} |
my $javascript_validations=&javascript_validations($krbdefdom); |
my $javascript_validations=&javascript_validations($krbdefdom); |
|
my $checked=(($ENV{'form.noFirstLine'})?' checked="1"':''); |
$r->print(<<ENDPICK); |
$r->print(<<ENDPICK); |
<h3>Uploading Class List</h3> |
<h3>Uploading Class List</h3> |
<hr> |
<hr> |
Line 198 to this page if the data selected is ins
|
Line 199 to this page if the data selected is ins
|
<input type="hidden" name="associate" value="" /> |
<input type="hidden" name="associate" value="" /> |
<input type="hidden" name="datatoken" value="$datatoken" /> |
<input type="hidden" name="datatoken" value="$datatoken" /> |
<input type="hidden" name="fileupload" value="$ENV{'form.fileupload'}" /> |
<input type="hidden" name="fileupload" value="$ENV{'form.fileupload'}" /> |
<input type="hidden" name="noFirstLine" value="$ENV{'form.noFirstLine'}" /> |
<input type="checkbox" name="noFirstLine" $checked />Ignore First Line |
<input type="hidden" name="upfiletype" value="$ENV{'form.upfiletype'}" /> |
<input type="hidden" name="upfiletype" value="$ENV{'form.upfiletype'}" /> |
<input type="hidden" name="upfile_associate" |
<input type="hidden" name="upfile_associate" |
value="$ENV{'form.upfile_associate'}" /> |
value="$ENV{'form.upfile_associate'}" /> |
Line 506 ENDPICK
|
Line 507 ENDPICK
|
# ======================================================= Menu Phase Two Upload |
# ======================================================= Menu Phase Two Upload |
sub print_upload_manager_form { |
sub print_upload_manager_form { |
my $r=shift; |
my $r=shift; |
|
my $firstLine; |
my $datatoken; |
my $datatoken; |
if (!$ENV{'form.datatoken'}) { |
if (!$ENV{'form.datatoken'}) { |
$datatoken=&Apache::loncommon::upfile_store($r); |
$datatoken=&Apache::loncommon::upfile_store($r); |
Line 515 sub print_upload_manager_form {
|
Line 516 sub print_upload_manager_form {
|
&Apache::loncommon::load_tmp_file($r); |
&Apache::loncommon::load_tmp_file($r); |
} |
} |
my @records=&Apache::loncommon::upfile_record_sep(); |
my @records=&Apache::loncommon::upfile_record_sep(); |
|
if($ENV{'form.noFirstLine'}){$firstLine=shift(@records);} |
my $total=$#records; |
my $total=$#records; |
my $distotal=$total+1; |
my $distotal=$total+1; |
my $today=time; |
my $today=time; |
Line 525 sub print_upload_manager_form {
|
Line 527 sub print_upload_manager_form {
|
&print_upload_manager_header($r,$datatoken,$distotal,$krbdefdom); |
&print_upload_manager_header($r,$datatoken,$distotal,$krbdefdom); |
my $i; |
my $i; |
my $keyfields; |
my $keyfields; |
my $dummy; |
|
if ($total>=0) { |
if ($total>=0) { |
my @d=(['username','Username'], |
my @d=(['username','Username'], |
['names','Last Name, First Names'], |
['names','Last Name, First Names'], |
Line 537 sub print_upload_manager_form {
|
Line 538 sub print_upload_manager_form {
|
['sec','Group/Section'], |
['sec','Group/Section'], |
['ipwd','Initial Password'], |
['ipwd','Initial Password'], |
['email','EMail Address']); |
['email','EMail Address']); |
if($ENV{'form.noFirstLine'}){ |
|
($dummy,@records)=@records; |
|
} |
|
|
|
if ($ENV{'form.upfile_associate'} eq 'reverse') { |
if ($ENV{'form.upfile_associate'} eq 'reverse') { |
&Apache::loncommon::csv_print_samples($r,\@records); |
&Apache::loncommon::csv_print_samples($r,\@records); |
$i=&Apache::loncommon::csv_print_select_table($r,\@records,\@d); |
$i=&Apache::loncommon::csv_print_select_table($r,\@records,\@d); |
Line 1548 sub upfile_drop_add {
|
Line 1545 sub upfile_drop_add {
|
my $r=shift; |
my $r=shift; |
&Apache::loncommon::load_tmp_file($r); |
&Apache::loncommon::load_tmp_file($r); |
my @studentdata=&Apache::loncommon::upfile_record_sep(); |
my @studentdata=&Apache::loncommon::upfile_record_sep(); |
|
if($ENV{'form.noFirstLine'}){shift(@studentdata);} |
my @keyfields = split(/\,/,$ENV{'form.keyfields'}); |
my @keyfields = split(/\,/,$ENV{'form.keyfields'}); |
my $cid = $ENV{'request.course.id'}; |
my $cid = $ENV{'request.course.id'}; |
my %fields=(); |
my %fields=(); |