Annotation of loncom/homework/loncapagrade.pm, revision 1.1
1.1 ! albertel 1: # The LearningOnline Network with CAPA
! 2: # external style responses
! 3: #
! 4: # $Id: essayresponse.pm,v 1.7 2002/01/18 17:45:30 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',('awarddetail','message'));
! 47: }
! 48: return $result;
! 49: }
! 50:
! 51: sub end_loncapagrade {
! 52: my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
! 53: my $result;
! 54: if ($target eq 'grade') {
! 55: &Apache::lonxml::deregister('Apache::loncapagrade',
! 56: ('loncapagrade','awardetail','message'));
! 57: }
! 58: return $result;
! 59: }
! 60:
! 61: sub start_awarddetail {
! 62: my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
! 63: my $result;
! 64: if ($target eq 'grade') { &Apache::lonxml::startredirection; }
! 65: return $result;
! 66: }
! 67:
! 68: sub end_awarddetail {
! 69: my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
! 70: my $result;
! 71: if ($target eq 'grade') {
! 72: $Apache::loncapagrade::results{'awarddetail'}=
! 73: &Apache::lonxml::endredirection;
! 74: }
! 75: return $result;
! 76: }
! 77:
! 78: sub start_message {
! 79: my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
! 80: my $result;
! 81: if ($target eq 'grade') { &Apache::lonxml::startredirection; }
! 82: return $result;
! 83: }
! 84:
! 85: sub end_message {
! 86: my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
! 87: my $result;
! 88: if ($target eq 'grade') {
! 89: $Apache::loncapagrade::results{'message'}=
! 90: &Apache::lonxml::endredirection;
! 91: }
! 92: return $result;
! 93: }
! 94:
! 95: 1;
! 96: __END__
! 97:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>