version 1.182, 2004/03/19 03:58:06
|
version 1.183, 2004/03/19 04:20:24
|
Line 4273 sub scantron_upload_scantron_data_save {
|
Line 4273 sub scantron_upload_scantron_data_save {
|
# See if there is anything left |
# See if there is anything left |
unless ($fname) { return 'error: no uploaded file'; } |
unless ($fname) { return 'error: no uploaded file'; } |
$fname='scantron_orig_'.$fname; |
$fname='scantron_orig_'.$fname; |
$r->print(&Apache::lonnet::finishuserfileupload($ENV{'form.courseid'}, |
if (length($ENV{'form.upfile'}) < 2) { |
$ENV{'form.domainid'}, |
$r->print("<font color='red'>Error:</font> The file you attempted to upload, <tt>".&HTML::Entities::encode($ENV{'form.upfile.filename'})."</tt>, contained no information. Please check that you entered the correct filename."); |
$home,'upfile',$fname)); |
} else { |
|
my $result=&Apache::lonnet::finishuserfileupload($ENV{'form.courseid'},$ENV{'form.domainid'},$home,'upfile',$fname); |
|
if ($result =~ m|^/uploaded/|) { |
|
$r->print("<font color='green'>Success:</font> Successfully uploaded ".(length($ENV{'form.upfile'})-1)." bytes of data into location <tt>".$result."</tt>"); |
|
} else { |
|
$r->print("<font color='red'>Error:</font> An error (".$result.") occured when attempting to upload the file, <tt>".&HTML::Entities::encode($ENV{'form.upfile.filename'})."</tt>"); |
|
} |
|
} |
if ($symb) { |
if ($symb) { |
$r->print(&show_grading_menu_form($symb,$url)); |
$r->print(&show_grading_menu_form($symb,$url)); |
} else { |
} else { |