Annotation of loncom/homework/loncapagrade.pm, revision 1.5

1.1       albertel    1: # The LearningOnline Network with CAPA
                      2: # external style responses
                      3: #
1.5     ! jms         4: # $Id: loncapagrade.pm,v 1.4 2007/09/11 19:07:01 albertel Exp $
1.1       albertel    5: #
                      6: # Copyright Michigan State University Board of Trustees
                      7: #
                      8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
                      9: #
                     10: # LON-CAPA is free software; you can redistribute it and/or modify
                     11: # it under the terms of the GNU General Public License as published by
                     12: # the Free Software Foundation; either version 2 of the License, or
                     13: # (at your option) any later version.
                     14: #
                     15: # LON-CAPA is distributed in the hope that it will be useful,
                     16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
                     17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     18: # GNU General Public License for more details.
                     19: #
                     20: # You should have received a copy of the GNU General Public License
                     21: # along with LON-CAPA; if not, write to the Free Software
                     22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                     23: #
                     24: # /home/httpd/html/adm/gpl.txt
                     25: #
                     26: # http://www.lon-capa.org/
                     27: #
                     28: # 1/26 Guy
1.5     ! jms        29: 
        !            30: 
        !            31: =pod
        !            32: 
        !            33: =head1 NAME
        !            34: 
        !            35: Apache::loncapagrade
        !            36: 
        !            37: =head1 SYNOPSIS
        !            38: 
        !            39: Handler to evaluate externally graded responses.
        !            40: 
        !            41: This is part of the LearningOnline Network with CAPA project
        !            42: described at http://www.lon-capa.org.
        !            43: 
        !            44: =head2 notes
        !            45: 
        !            46: results of parse end up in here:
        !            47: undef(%Apache::loncapagrade::results);
        !            48: 
        !            49: =cut
        !            50: 
1.1       albertel   51: package Apache::loncapagrade;
                     52: use strict;
                     53: 
                     54: #Globals
                     55: # results of parse end up in here
1.4       albertel   56: undef(%Apache::loncapagrade::results);
1.1       albertel   57: 
                     58: BEGIN {
                     59: #  &Apache::lonxml::register('Apache::loncapagrade',
1.4       albertel   60: #			    ('loncapagrade','awarddetail','message'));
1.1       albertel   61: }
                     62: 
                     63: sub start_loncapagrade {
1.3       albertel   64:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                     65:     my $result;
                     66:     if ($target eq 'grade') {
1.4       albertel   67: 	undef(%Apache::loncapagrade::results);
1.3       albertel   68: 	&Apache::lonxml::register('Apache::loncapagrade',
                     69: 				  ('awarddetail','message'));
                     70:     }
                     71:     return $result;
1.1       albertel   72: }
                     73: 
                     74: sub end_loncapagrade {
1.3       albertel   75:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                     76:     my $result;
                     77:     if ($target eq 'grade') {
                     78: 	&Apache::lonxml::deregister('Apache::loncapagrade',
1.4       albertel   79: 				    ('loncapagrade','awarddetail','message'));
1.3       albertel   80:     }
                     81:     return $result;
1.1       albertel   82: }
                     83: 
                     84: sub start_awarddetail {
1.3       albertel   85:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                     86:     my $result;
                     87:     if ($target eq 'grade') { &Apache::lonxml::startredirection(); }
                     88:     return $result;
1.1       albertel   89: }
                     90: 
                     91: sub end_awarddetail {
1.3       albertel   92:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                     93:     my $result;
                     94:     if ($target eq 'grade') {
                     95: 	$Apache::loncapagrade::results{'awarddetail'}=
                     96: 	    &Apache::lonxml::endredirection();
                     97:     }
                     98:     return $result;
1.1       albertel   99: }
                    100: 
                    101: sub start_message {
1.3       albertel  102:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                    103:     my $result;
                    104:     if ($target eq 'grade') { &Apache::lonxml::startredirection(); }
                    105:     return $result;
1.1       albertel  106: }
                    107: 
                    108: sub end_message {
1.3       albertel  109:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                    110:     my $result;
                    111:     if ($target eq 'grade') {
                    112: 	$Apache::loncapagrade::results{'message'}=
                    113: 	    &Apache::lonxml::endredirection();
                    114:     }
                    115:     return $result;
1.1       albertel  116: }
                    117: 
                    118: 1;
                    119: __END__
                    120: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>