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

1.1       albertel    1: # The LearningOnline Network with CAPA
                      2: # external style responses
                      3: #
1.6     ! jms         4: # $Id: loncapagrade.pm,v 1.5 2008/11/10 13:43:43 jms 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: 
1.1       albertel   32: package Apache::loncapagrade;
                     33: use strict;
                     34: 
                     35: #Globals
                     36: # results of parse end up in here
1.4       albertel   37: undef(%Apache::loncapagrade::results);
1.1       albertel   38: 
                     39: BEGIN {
                     40: #  &Apache::lonxml::register('Apache::loncapagrade',
1.4       albertel   41: #			    ('loncapagrade','awarddetail','message'));
1.1       albertel   42: }
                     43: 
                     44: sub start_loncapagrade {
1.3       albertel   45:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                     46:     my $result;
                     47:     if ($target eq 'grade') {
1.4       albertel   48: 	undef(%Apache::loncapagrade::results);
1.3       albertel   49: 	&Apache::lonxml::register('Apache::loncapagrade',
                     50: 				  ('awarddetail','message'));
                     51:     }
                     52:     return $result;
1.1       albertel   53: }
                     54: 
                     55: sub end_loncapagrade {
1.3       albertel   56:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                     57:     my $result;
                     58:     if ($target eq 'grade') {
                     59: 	&Apache::lonxml::deregister('Apache::loncapagrade',
1.4       albertel   60: 				    ('loncapagrade','awarddetail','message'));
1.3       albertel   61:     }
                     62:     return $result;
1.1       albertel   63: }
                     64: 
                     65: sub start_awarddetail {
1.3       albertel   66:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                     67:     my $result;
                     68:     if ($target eq 'grade') { &Apache::lonxml::startredirection(); }
                     69:     return $result;
1.1       albertel   70: }
                     71: 
                     72: sub end_awarddetail {
1.3       albertel   73:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                     74:     my $result;
                     75:     if ($target eq 'grade') {
                     76: 	$Apache::loncapagrade::results{'awarddetail'}=
                     77: 	    &Apache::lonxml::endredirection();
                     78:     }
                     79:     return $result;
1.1       albertel   80: }
                     81: 
                     82: sub start_message {
1.3       albertel   83:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                     84:     my $result;
                     85:     if ($target eq 'grade') { &Apache::lonxml::startredirection(); }
                     86:     return $result;
1.1       albertel   87: }
                     88: 
                     89: sub end_message {
1.3       albertel   90:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                     91:     my $result;
                     92:     if ($target eq 'grade') {
                     93: 	$Apache::loncapagrade::results{'message'}=
                     94: 	    &Apache::lonxml::endredirection();
                     95:     }
                     96:     return $result;
1.1       albertel   97: }
                     98: 
                     99: 1;
                    100: __END__
                    101: 
1.6     ! jms       102: =pod
        !           103: 
        !           104: =head1 NAME
        !           105: 
        !           106: Apache::loncapagrade
        !           107: 
        !           108: =head1 SYNOPSIS
        !           109: 
        !           110: Handler to evaluate externally graded responses.
        !           111: 
        !           112: This is part of the LearningOnline Network with CAPA project
        !           113: described at http://www.lon-capa.org.
        !           114: 
        !           115: =head1 SUBROUTINES
        !           116: 
        !           117: =over
        !           118: 
        !           119: =item start_loncapagrade()
        !           120: 
        !           121: =item end_loncapagrade()
        !           122: 
        !           123: =item start_awarddetail()
        !           124: 
        !           125: =item end_awarddetail()
        !           126: 
        !           127: =item start_message()
        !           128: 
        !           129: =item end_message()
        !           130: 
        !           131: =back
        !           132: 
        !           133: =head2 notes
        !           134: 
        !           135: results of parse end up in here:
        !           136: undef(%Apache::loncapagrade::results);
        !           137: 
        !           138: =cut
        !           139: 
        !           140: 

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