version 1.244, 2005/02/12 03:14:44
|
version 1.245, 2005/02/12 03:43:06
|
Line 2737 sub csvuploadmap_header {
|
Line 2737 sub csvuploadmap_header {
|
} |
} |
|
|
my ($result) = &showResourceInfo($url,$ENV{'form.probTitle'}); |
my ($result) = &showResourceInfo($url,$ENV{'form.probTitle'}); |
|
my $checked=(($ENV{'form.noFirstLine'})?' checked="checked"':''); |
|
my $ignore=&mt('Ignore First Line'); |
$request->print(<<ENDPICK); |
$request->print(<<ENDPICK); |
<form method="post" enctype="multipart/form-data" action="/adm/grades" name="gradesupload"> |
<form method="post" enctype="multipart/form-data" action="/adm/grades" name="gradesupload"> |
<h3><font color="#339933">Uploading Class Grades</font></h3> |
<h3><font color="#339933">Uploading Class Grades</font></h3> |
Line 2748 Total number of records found in file: $
|
Line 2749 Total number of records found in file: $
|
Enter as many fields as you can. The system will inform you and bring you back |
Enter as many fields as you can. The system will inform you and bring you back |
to this page if the data selected is insufficient to run your class.<hr /> |
to this page if the data selected is insufficient to run your class.<hr /> |
<input type="button" value="Reverse Association" onClick="javascript:this.form.associate.value='Reverse Association';submit(this.form);" /> |
<input type="button" value="Reverse Association" onClick="javascript:this.form.associate.value='Reverse Association';submit(this.form);" /> |
|
<label><input type="checkbox" name="noFirstLine" $checked />$ignore</label> |
<input type="hidden" name="associate" value="" /> |
<input type="hidden" name="associate" value="" /> |
<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 2824 CSVFORMJS
|
Line 2826 CSVFORMJS
|
'.</b></td></tr>'."\n"; |
'.</b></td></tr>'."\n"; |
$result.='<tr bgcolor=#ffffe6><td>'."\n"; |
$result.='<tr bgcolor=#ffffe6><td>'."\n"; |
my $upfile_select=&Apache::loncommon::upfile_select_html(); |
my $upfile_select=&Apache::loncommon::upfile_select_html(); |
|
my $ignore=&mt('Ignore First Line'); |
$result.=<<ENDUPFORM; |
$result.=<<ENDUPFORM; |
<form method="post" enctype="multipart/form-data" action="/adm/grades" name="gradesupload"> |
<form method="post" enctype="multipart/form-data" action="/adm/grades" name="gradesupload"> |
<input type="hidden" name="symb" value="$symb" /> |
<input type="hidden" name="symb" value="$symb" /> |
Line 2833 CSVFORMJS
|
Line 2836 CSVFORMJS
|
<input type="hidden" name="saveState" value="$ENV{'form.saveState'}" /> |
<input type="hidden" name="saveState" value="$ENV{'form.saveState'}" /> |
$upfile_select |
$upfile_select |
<br /><input type="button" onClick="javascript:checkUpload(this.form);" value="Upload Scores" /> |
<br /><input type="button" onClick="javascript:checkUpload(this.form);" value="Upload Scores" /> |
|
<label><input type="checkbox" name="noFirstLine" />$ignore</lable> |
</form> |
</form> |
ENDUPFORM |
ENDUPFORM |
$result.='</td></tr></table>'."\n"; |
$result.='</td></tr></table>'."\n"; |
Line 2856 sub csvuploadmap {
|
Line 2859 sub csvuploadmap {
|
&Apache::loncommon::load_tmp_file($request); |
&Apache::loncommon::load_tmp_file($request); |
} |
} |
my @records=&Apache::loncommon::upfile_record_sep(); |
my @records=&Apache::loncommon::upfile_record_sep(); |
|
if ($ENV{'form.noFirstLine'}) { shift(@records); } |
&csvuploadmap_header($request,$symb,$url,$datatoken,$#records+1); |
&csvuploadmap_header($request,$symb,$url,$datatoken,$#records+1); |
my ($i,$keyfields); |
my ($i,$keyfields); |
if (@records) { |
if (@records) { |
Line 2887 sub csvuploadassign {
|
Line 2891 sub csvuploadassign {
|
if (!$symb) {return '';} |
if (!$symb) {return '';} |
&Apache::loncommon::load_tmp_file($request); |
&Apache::loncommon::load_tmp_file($request); |
my @gradedata = &Apache::loncommon::upfile_record_sep(); |
my @gradedata = &Apache::loncommon::upfile_record_sep(); |
|
if ($ENV{'form.noFirstLine'}) { shift(@gradedata); } |
my @keyfields = split(/\,/,$ENV{'form.keyfields'}); |
my @keyfields = split(/\,/,$ENV{'form.keyfields'}); |
my %fields=(); |
my %fields=(); |
for (my $i=0; $i<=$ENV{'form.nfields'}; $i++) { |
for (my $i=0; $i<=$ENV{'form.nfields'}; $i++) { |