# The LON-CAPA Grading handler
# Guy Albertelli
# 11/30 Gerd Kortemeyer
# 6/1 Gerd Kortemeyer
package Apache::grades;
use strict;
use Apache::style;
use Apache::lonxml;
use Apache::lonnet;
use Apache::lonhomework;
use Apache::Constants qw(:common);
sub handler {
my $request=$_[0];
if ( $ENV{'user.name'} eq 'albertel' ) {$Apache::lonxml::debug=1;} else {$Apache::lonxml::debug=0;}
if ($ENV{'browser.mathml'}) {
$request->content_type('text/xml');
} else {
$request->content_type('text/html');
}
$request->send_http_header;
return OK if $request->header_only;
my $url=$ENV{'form.url'};
if ($url eq '') {
$request->print("Non-Contextual Access Unsupported");
} else {
$Apache::grades::viewgrades=&Apache::lonnet::allowed('vgr',$url);
}
return OK;
}
1;
__END__;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>