version 1.1, 2002/01/30 17:30:48
|
version 1.5, 2008/11/10 13:43:43
|
Line 26
|
Line 26
|
# http://www.lon-capa.org/ |
# http://www.lon-capa.org/ |
# |
# |
# 1/26 Guy |
# 1/26 Guy |
|
|
|
|
|
=pod |
|
|
|
=head1 NAME |
|
|
|
Apache::loncapagrade |
|
|
|
=head1 SYNOPSIS |
|
|
|
Handler to evaluate externally graded responses. |
|
|
|
This is part of the LearningOnline Network with CAPA project |
|
described at http://www.lon-capa.org. |
|
|
|
=head2 notes |
|
|
|
results of parse end up in here: |
|
undef(%Apache::loncapagrade::results); |
|
|
|
=cut |
|
|
package Apache::loncapagrade; |
package Apache::loncapagrade; |
use strict; |
use strict; |
|
|
#Globals |
#Globals |
# results of parse end up in here |
# results of parse end up in here |
%Apache::loncapagrade::result; |
undef(%Apache::loncapagrade::results); |
|
|
BEGIN { |
BEGIN { |
# &Apache::lonxml::register('Apache::loncapagrade', |
# &Apache::lonxml::register('Apache::loncapagrade', |
# ('loncapagrade','awardetail','message')); |
# ('loncapagrade','awarddetail','message')); |
} |
} |
|
|
sub start_loncapagrade { |
sub start_loncapagrade { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result; |
my $result; |
if ($target eq 'grade') { |
if ($target eq 'grade') { |
%Apache::loncapagrade::results=(); |
undef(%Apache::loncapagrade::results); |
&Apache::lonxml::register('Apache::loncapagrade',('awarddetail','message')); |
&Apache::lonxml::register('Apache::loncapagrade', |
} |
('awarddetail','message')); |
return $result; |
} |
|
return $result; |
} |
} |
|
|
sub end_loncapagrade { |
sub end_loncapagrade { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result; |
my $result; |
if ($target eq 'grade') { |
if ($target eq 'grade') { |
&Apache::lonxml::deregister('Apache::loncapagrade', |
&Apache::lonxml::deregister('Apache::loncapagrade', |
('loncapagrade','awardetail','message')); |
('loncapagrade','awarddetail','message')); |
} |
} |
return $result; |
return $result; |
} |
} |
|
|
sub start_awarddetail { |
sub start_awarddetail { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result; |
my $result; |
if ($target eq 'grade') { &Apache::lonxml::startredirection; } |
if ($target eq 'grade') { &Apache::lonxml::startredirection(); } |
return $result; |
return $result; |
} |
} |
|
|
sub end_awarddetail { |
sub end_awarddetail { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result; |
my $result; |
if ($target eq 'grade') { |
if ($target eq 'grade') { |
$Apache::loncapagrade::results{'awarddetail'}= |
$Apache::loncapagrade::results{'awarddetail'}= |
&Apache::lonxml::endredirection; |
&Apache::lonxml::endredirection(); |
} |
} |
return $result; |
return $result; |
} |
} |
|
|
sub start_message { |
sub start_message { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result; |
my $result; |
if ($target eq 'grade') { &Apache::lonxml::startredirection; } |
if ($target eq 'grade') { &Apache::lonxml::startredirection(); } |
return $result; |
return $result; |
} |
} |
|
|
sub end_message { |
sub end_message { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result; |
my $result; |
if ($target eq 'grade') { |
if ($target eq 'grade') { |
$Apache::loncapagrade::results{'message'}= |
$Apache::loncapagrade::results{'message'}= |
&Apache::lonxml::endredirection; |
&Apache::lonxml::endredirection(); |
} |
} |
return $result; |
return $result; |
} |
} |
|
|
1; |
1; |