File:  [LON-CAPA] / loncom / homework / loncapagrade.pm
Revision 1.6: download - view: text, annotated - select for diffs
Thu Nov 20 15:19:15 2008 UTC (15 years, 5 months ago) by jms
Branches: MAIN
CVS tags: version_2_9_X, version_2_9_99_0, version_2_9_1, version_2_9_0, version_2_8_99_1, version_2_8_99_0, version_2_10_0_RC2, version_2_10_0_RC1, bz6209-base, bz6209, bz5969, bz2851, PRINT_INCOMPLETE_base, PRINT_INCOMPLETE, HEAD, GCI_3, GCI_2, BZ5971-printing-apage, BZ5434-fox
Moved POD comments to bottom of file

    1: # The LearningOnline Network with CAPA
    2: # external style responses
    3: #
    4: # $Id: loncapagrade.pm,v 1.6 2008/11/20 15:19:15 jms Exp $
    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
   29: 
   30: 
   31: 
   32: package Apache::loncapagrade;
   33: use strict;
   34: 
   35: #Globals
   36: # results of parse end up in here
   37: undef(%Apache::loncapagrade::results);
   38: 
   39: BEGIN {
   40: #  &Apache::lonxml::register('Apache::loncapagrade',
   41: #			    ('loncapagrade','awarddetail','message'));
   42: }
   43: 
   44: sub start_loncapagrade {
   45:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   46:     my $result;
   47:     if ($target eq 'grade') {
   48: 	undef(%Apache::loncapagrade::results);
   49: 	&Apache::lonxml::register('Apache::loncapagrade',
   50: 				  ('awarddetail','message'));
   51:     }
   52:     return $result;
   53: }
   54: 
   55: sub end_loncapagrade {
   56:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   57:     my $result;
   58:     if ($target eq 'grade') {
   59: 	&Apache::lonxml::deregister('Apache::loncapagrade',
   60: 				    ('loncapagrade','awarddetail','message'));
   61:     }
   62:     return $result;
   63: }
   64: 
   65: sub start_awarddetail {
   66:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   67:     my $result;
   68:     if ($target eq 'grade') { &Apache::lonxml::startredirection(); }
   69:     return $result;
   70: }
   71: 
   72: sub end_awarddetail {
   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;
   80: }
   81: 
   82: sub start_message {
   83:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   84:     my $result;
   85:     if ($target eq 'grade') { &Apache::lonxml::startredirection(); }
   86:     return $result;
   87: }
   88: 
   89: sub end_message {
   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;
   97: }
   98: 
   99: 1;
  100: __END__
  101: 
  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>