version 1.209, 2004/09/14 13:30:09
|
version 1.210, 2004/09/14 14:13:08
|
Line 4719 sub scantron_upload_scantron_data_save {
|
Line 4719 sub scantron_upload_scantron_data_save {
|
} |
} |
return ''; |
return ''; |
} |
} |
# $r->print("Doing upload to ".$ENV{'form.courseid'}." <br />"); |
$r->print("Doing upload to ".$ENV{'form.courseid'}." <br />"); |
my $home=&Apache::lonnet::homeserver($ENV{'form.courseid'}, |
my $home=&Apache::lonnet::homeserver($ENV{'form.courseid'}, |
$ENV{'form.domainid'}); |
$ENV{'form.domainid'}); |
my $fname=$ENV{'form.upfile.filename'}; |
my $fname=$ENV{'form.upfile.filename'}; |
Line 4742 sub scantron_upload_scantron_data_save {
|
Line 4742 sub scantron_upload_scantron_data_save {
|
$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."); |
$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."); |
} else { |
} else { |
my $result=&Apache::lonnet::finishuserfileupload($ENV{'form.courseid'},$ENV{'form.domainid'},$home,'upfile',$fname); |
my $result=&Apache::lonnet::finishuserfileupload($ENV{'form.courseid'},$ENV{'form.domainid'},$home,'upfile',$fname); |
# if ($result =~ m|^/uploaded/|) { |
if ($result =~ m|^/uploaded/|) { |
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>"); |
# $r->print("<font color='green'>Success:</font> Successfully uploaded ".(length($ENV{'form.upfile'})-1)." bytes of data into location <tt>".$result."</tt>"); |
} else { |
# } else { |
|
$r->print("<font color='red'>Error:</font> An error (".$result.") occurred when attempting to upload the file, <tt>".&HTML::Entities::encode($ENV{'form.upfile.filename'},'<>&"')."</tt>"); |
$r->print("<font color='red'>Error:</font> An error (".$result.") occurred 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(&scantron_selectphase($r,$uploadedfile)); |
$r->print(&scantron_selectphase($r,$uploadedfile)); |
|
|
} else { |
} else { |
$r->print($doanotherupload); |
$r->print($doanotherupload); |
} |
} |