[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 19 Mar 2004 03:58:06 -0000
albertel Thu Mar 18 22:58:06 2004 EDT
Modified files:
/loncom/homework grades.pm
Log:
- prettier, and prevent some error messages from showing
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.181 loncom/homework/grades.pm:1.182
--- loncom/homework/grades.pm:1.181 Thu Mar 18 22:47:09 2004
+++ loncom/homework/grades.pm Thu Mar 18 22:58:06 2004
@@ -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 @@
sub scantron_upload_scantron_data_save {
my($r)=@_;
+ my ($symb,$url)=&get_symb_and_url($r,1);
+ my $doanotherupload=
+ '<br /><form action="/adm/grades" method="post">'."\n".
+ '<input type="hidden" name="command" value="scantronupload" />'."\n".
+ '<input type="submit" name="submit" value="Do Another Upload" />'."\n".
+ '</form>'."\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.<br />");
- $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'}." <br />");
@@ -4266,14 +4276,10 @@
$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('<br /><form action="/adm/grades" method="post">'."\n".
- '<input type="hidden" name="command" value="scantronupload" />'."\n".
- '<input type="submit" name="submit" value="Do Another Upload" />'."\n".
- '</form>'."\n");
+ $r->print($doanotherupload);
}
return '';
}