Annotation of loncom/homework/grades.pm, revision 1.1
1.1 ! albertel 1: # The LON-CAPA Grading handler
! 2: # Guy Albertelli
! 3: # 11/30 Gerd Kortemeyer
! 4: # 6/1 Gerd Kortemeyer
! 5:
! 6: package Apache::grades;
! 7: use strict;
! 8: use Apache::style;
! 9: use Apache::lonxml;
! 10: use Apache::lonnet;
! 11: use Apache::lonhomework;
! 12: use Apache::Constants qw(:common);
! 13:
! 14: sub handler {
! 15: my $request=$_[0];
! 16:
! 17: if ( $ENV{'user.name'} eq 'albertel' ) {$Apache::lonxml::debug=1;} else {$Apache::lonxml::debug=0;}
! 18:
! 19: if ($ENV{'browser.mathml'}) {
! 20: $request->content_type('text/xml');
! 21: } else {
! 22: $request->content_type('text/html');
! 23: }
! 24: $request->send_http_header;
! 25: return OK if $request->header_only;
! 26: my $url=$ENV{'form.url'};
! 27: if ($url eq '') {
! 28: $request->print("Non-Contextual Access Unsupported");
! 29: } else {
! 30: $Apache::grades::viewgrades=&Apache::lonnet::allowed('vgr',$url);
! 31: }
! 32:
! 33: return OK;
! 34: }
! 35:
! 36: 1;
! 37:
! 38: __END__;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>