--- loncom/homework/grades.pm 2001/11/29 23:16:29 1.17 +++ loncom/homework/grades.pm 2002/05/16 00:01:09 1.25 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.17 2001/11/29 23:16:29 albertel Exp $ +# $Id: grades.pm,v 1.25 2002/05/16 00:01:09 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -59,40 +59,98 @@ sub moreinfo { return ''; } +sub verifyreceipt { + my $request=shift; + my $courseid=$ENV{'request.course.id'}; + my $cdom=$ENV{"course.$courseid.domain"}; + my $cnum=$ENV{"course.$courseid.num"}; + my $receipt=unpack("%32C*",$Apache::lonnet::perlvar{'lonHostID'}).'-'. + $ENV{'form.receipt'}; + $receipt=~s/[^\-\d]//g; + my $symb=$ENV{'form.symb'}; + unless ($symb) { + $symb=&Apache::lonnet::symbread($ENV{'form.url'}); + } + if ((&Apache::lonnet::allowed('mgr',$courseid)) && ($symb)) { + $request->print('
'.$matches.' match(es)
'); + } + return ''; +} sub listStudents { my ($request) = shift; - my ($cdom,$cnum) = split(/_/,$ENV{'request.course.id'}); - my $chome=$ENV{"course.$ENV{'request.course.id'}.home"}; - $request->print ("Found $cdom:$cnum:$chome