--- loncom/homework/grades.pm 2004/02/09 21:13:50 1.172 +++ loncom/homework/grades.pm 2004/02/09 22:16:32 1.173 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.172 2004/02/09 21:13:50 albertel Exp $ +# $Id: grades.pm,v 1.173 2004/02/09 22:16:32 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -89,10 +89,15 @@ sub getpartlist { # --- Get the symbolic name of a problem and the url sub get_symb_and_url { - my ($request) = @_; + my ($request,$silent) = @_; (my $url=$ENV{'form.url'}) =~ s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--; my $symb=($ENV{'form.symb'} ne '' ? $ENV{'form.symb'} : (&Apache::lonnet::symbread($url))); - if ($symb eq '') { $request->print("Unable to handle ambiguous references:$url:."); return ''; } + if ($symb eq '') { + if (!$silent) { + $request->print("Unable to handle ambiguous references:$url:."); + return (); + } + } return ($symb,$url); } @@ -4171,7 +4176,7 @@ sub scantron_upload_scantron_data { 'domainid'); my $domsel=&Apache::loncommon::select_dom_form($ENV{'request.role.domain'}, 'domainid'); - my $default_form_data=&defaultFormData(&get_symb_and_url($r)); + my $default_form_data=&defaultFormData(&get_symb_and_url($r,1)); $r->print(< function checkUpload(formname) { @@ -4227,7 +4232,10 @@ sub scantron_upload_scantron_data_save { $r->print(&Apache::lonnet::finishuserfileupload($ENV{'form.courseid'}, $ENV{'form.domainid'}, $home,'upfile',$fname)); - $r->print(&show_grading_menu_form(&get_symb_and_url($r))); + $r->print('
'."\n". + ''."\n". + ''."\n". + '
'."\n"); return ''; }