File:  [LON-CAPA] / loncom / homework / loncapagrade.pm
Revision 1.3: download - view: text, annotated - select for diffs
Tue Oct 18 14:14:12 2005 UTC (18 years, 6 months ago) by albertel
Branches: MAIN
CVS tags: version_2_5_X, version_2_5_2, version_2_5_1, version_2_5_0, version_2_4_X, version_2_4_99_0, version_2_4_2, version_2_4_1, version_2_4_0, version_2_3_X, version_2_3_99_0, version_2_3_2, version_2_3_1, version_2_3_0, version_2_2_X, version_2_2_99_1, version_2_2_99_0, version_2_2_2, version_2_2_1, version_2_2_0, version_2_1_X, version_2_1_99_3, version_2_1_99_2, version_2_1_99_1, version_2_1_99_0, version_2_1_3, version_2_1_2, version_2_1_1, version_2_1_0, version_2_0_99_1, HEAD
- style policing

    1: # The LearningOnline Network with CAPA
    2: # external style responses
    3: #
    4: # $Id: loncapagrade.pm,v 1.3 2005/10/18 14:14:12 albertel 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: package Apache::loncapagrade;
   30: use strict;
   31: 
   32: #Globals
   33: # results of parse end up in here
   34: %Apache::loncapagrade::result=();
   35: 
   36: BEGIN {
   37: #  &Apache::lonxml::register('Apache::loncapagrade',
   38: #			    ('loncapagrade','awardetail','message'));
   39: }
   40: 
   41: sub start_loncapagrade {
   42:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   43:     my $result;
   44:     if ($target eq 'grade') {
   45: 	%Apache::loncapagrade::results=();
   46: 	&Apache::lonxml::register('Apache::loncapagrade',
   47: 				  ('awarddetail','message'));
   48:     }
   49:     return $result;
   50: }
   51: 
   52: sub end_loncapagrade {
   53:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   54:     my $result;
   55:     if ($target eq 'grade') {
   56: 	&Apache::lonxml::deregister('Apache::loncapagrade',
   57: 				    ('loncapagrade','awardetail','message'));
   58:     }
   59:     return $result;
   60: }
   61: 
   62: sub start_awarddetail {
   63:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   64:     my $result;
   65:     if ($target eq 'grade') { &Apache::lonxml::startredirection(); }
   66:     return $result;
   67: }
   68: 
   69: sub end_awarddetail {
   70:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   71:     my $result;
   72:     if ($target eq 'grade') {
   73: 	$Apache::loncapagrade::results{'awarddetail'}=
   74: 	    &Apache::lonxml::endredirection();
   75:     }
   76:     return $result;
   77: }
   78: 
   79: sub start_message {
   80:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   81:     my $result;
   82:     if ($target eq 'grade') { &Apache::lonxml::startredirection(); }
   83:     return $result;
   84: }
   85: 
   86: sub end_message {
   87:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   88:     my $result;
   89:     if ($target eq 'grade') {
   90: 	$Apache::loncapagrade::results{'message'}=
   91: 	    &Apache::lonxml::endredirection();
   92:     }
   93:     return $result;
   94: }
   95: 
   96: 1;
   97: __END__
   98: 

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