--- loncom/homework/grades.pm 2002/08/05 20:49:54 1.45 +++ loncom/homework/grades.pm 2002/08/06 20:46:30 1.46 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.45 2002/08/05 20:49:54 ng Exp $ +# $Id: grades.pm,v 1.46 2002/08/06 20:46:30 ng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -45,17 +45,6 @@ use Apache::Constants qw(:common); # ----- These first few routines are general use routines.----- # - -sub print_hash { - my ($request, $hash) = @_; - $request->print(''); - for (sort keys (%$hash)) { - $request->print(''); - } - $request->print('
KeyValue
'.$_.''.$$hash{$_}.' 
'); - return ''; -} - # --- Retrieve the parts that matches stores_\d+ from the metadata file.--- sub getpartlist { my ($url) = @_; @@ -114,17 +103,6 @@ sub response_type { return \@partlist,\%handgrade; } -#--- Prints a message on screen if a user did something wrong -#--- Operator error --- -sub userError { - my ($request, $reason, $step) = @_; - $request->print('

LON-CAPA User Error


'."\n"); - $request->print('Reason: '.$reason.'

'."\n"); - $request->print('Step: '.($step ne '' ? $step : 'Use your browser back button to correct') - .'

'."\n"); - return ''; -} - #--- Dumps the class list with usernames,list of sections, #--- section, ids and fullnames for each user. sub getclasslist { @@ -323,19 +301,22 @@ sub listStudents { '."\n"; + + $result.='
'."\n"; $result.=''."\n"; $result.='
'."\n"; $result.=' Specify a file containing the class scores for above resource
'."\n"; @@ -2151,7 +2140,7 @@ sub upcsvScores_form { $upfile_select -
  +
  ENDUPFORM $result.='
'."\n"; @@ -2185,8 +2174,8 @@ sub viewGradeaStu_form { ' everybody
'; $result.=' (Section "no" implies the students were not assigned a section.)
' if (grep /no/,@$sections); - - $result.='
 '."\n". + + $result.='
 '."\n". ''."\n"; $result.='
'."\n"; $result.=''."\n"; @@ -2196,17 +2185,27 @@ sub viewGradeaStu_form { #--- Form to input a receipt number --- sub verifyReceipt_form { my ($symb,$url) = @_; - my $cdom=$ENV{"course.$ENV{'request.course.id'}.domain"}; - my $cnum=$ENV{"course.$ENV{'request.course.id'}.num"}; + my $result = ''."\n"; + my $hostver=unpack("%32C*",$Apache::lonnet::perlvar{'lonHostID'}); - my $result.='
'."\n"; + $result.='
'."\n"; $result.=''."\n"; $result.='
'."\n"; $result.=' Verify a Submission Receipt Issued by this Server
'."\n"; - $result.='
'."\n"; + $result.=''."\n"; $result.=' '.$hostver.'-
'."\n"; - $result.=' '."\n"; + $result.=' '."\n"; $result.=''."\n"; if ($ENV{'form.url'}) { $result.=''; @@ -2268,7 +2267,6 @@ sub handler { } } } else { - #&Apache::lonhomework::showhashsubset(\%ENV,'^form'); $Apache::grades::viewgrades=&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'}); if ($command eq 'submission') { &listStudents($request) if ($ENV{'form.student'} eq '');