--- loncom/homework/grades.pm 2002/06/20 22:04:21 1.29 +++ loncom/homework/grades.pm 2002/06/24 21:05:12 1.30 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.29 2002/06/20 22:04:21 albertel Exp $ +# $Id: grades.pm,v 1.30 2002/06/24 21:05:12 ng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -29,6 +29,9 @@ # 6/8 Gerd Kortemeyer # 7/26 H.K. Ng # 8/20 Gerd Kortemeyer +# Year 2002 +# June 2002 H.K. Ng +# package Apache::grades; use strict; @@ -83,12 +86,12 @@ sub verifyreceipt { $matches++; } } - $request->print('
'.$matches.' match(es)
'); + $request->printf(''.$matches." match%s
",$matches <= 1 ? '' : 'es'); } return ''; } -sub listStudents { +sub receiptInput { my ($request) = shift; my $cdom=$ENV{"course.$ENV{'request.course.id'}.domain"}; my $cnum=$ENV{"course.$ENV{'request.course.id'}.num"}; @@ -108,13 +111,24 @@ ENDHEADER $request->print( ''); } +# $request->print(<
$rendered Correct answer: "; + my $companswer=&Apache::loncommon::get_student_answers($symb,$uname,$udom, + $ENV{'request.course.id'}); + $result.='
'; + } + my $last = ''; + $last = 'last' if ($ENV{'form.submission'} eq 'last'); + my $answer=&Apache::loncommon::get_previous_attempt($symb,$uname,$udom, + $ENV{'request.course.id'},$last); + $result.=$answer.' Needs an interface for inputting scores'; - $answer=&Apache::loncommon::get_student_answers($symb,$uname,$udom, - $ENV{'request.course.id'}); - $result.=$answer; + my (@parts) = sort(&getpartlist($url)); + + #start the form + $result.= ''; return $result; } @@ -349,7 +396,7 @@ sub view_edit_entire_class_form { ''."\n". ''."\n". ''."\n". - ''."\n". + ''."\n". ''."\n"; return $result; } @@ -386,7 +433,13 @@ sub gradingmenu { ''."\n". ''."\n". ''."\n". - ''."\n". + ''."\n". + ''."\n"; + $result.=''."\n"; $result.=' |