--- loncom/homework/grades.pm 2004/03/19 03:47:09 1.181
+++ loncom/homework/grades.pm 2004/03/19 03:58:06 1.182
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.181 2004/03/19 03:47:09 albertel Exp $
+# $Id: grades.pm,v 1.182 2004/03/19 03:58:06 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4238,11 +4238,21 @@ UPLOAD
sub scantron_upload_scantron_data_save {
my($r)=@_;
+ my ($symb,$url)=&get_symb_and_url($r,1);
+ my $doanotherupload=
+ '
'."\n";
if (!&Apache::lonnet::allowed('usc',$ENV{'form.domainid'}) &&
!&Apache::lonnet::allowed('usc',
$ENV{'form.domainid'}.'_'.$ENV{'form.courseid'})) {
$r->print("You are not allowed to upload Scantron data to the requested course.
");
- $r->print(&show_grading_menu_form(&get_symb_and_url($r)));
+ if ($symb) {
+ $r->print(&show_grading_menu_form($symb,$url));
+ } else {
+ $r->print($doanotherupload);
+ }
return '';
}
$r->print("Doing upload to ".$ENV{'form.courseid'}."
");
@@ -4266,14 +4276,10 @@ sub scantron_upload_scantron_data_save {
$r->print(&Apache::lonnet::finishuserfileupload($ENV{'form.courseid'},
$ENV{'form.domainid'},
$home,'upfile',$fname));
- my ($symb,$url)=&get_symb_and_url($r);
if ($symb) {
- $r->print(&show_grading_menu_form(&get_symb_and_url($r)));
+ $r->print(&show_grading_menu_form($symb,$url));
} else {
- $r->print('
'."\n");
+ $r->print($doanotherupload);
}
return '';
}