Annotation of loncom/homework/loncapagrade.pm, revision 1.3
1.1 albertel 1: # The LearningOnline Network with CAPA
2: # external style responses
3: #
1.3 ! albertel 4: # $Id: loncapagrade.pm,v 1.2 2002/08/07 17:08:30 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
29: package Apache::loncapagrade;
30: use strict;
31:
32: #Globals
33: # results of parse end up in here
1.2 albertel 34: %Apache::loncapagrade::result=();
1.1 albertel 35:
36: BEGIN {
37: # &Apache::lonxml::register('Apache::loncapagrade',
38: # ('loncapagrade','awardetail','message'));
39: }
40:
41: sub start_loncapagrade {
1.3 ! albertel 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;
1.1 albertel 50: }
51:
52: sub end_loncapagrade {
1.3 ! albertel 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;
1.1 albertel 60: }
61:
62: sub start_awarddetail {
1.3 ! albertel 63: my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
! 64: my $result;
! 65: if ($target eq 'grade') { &Apache::lonxml::startredirection(); }
! 66: return $result;
1.1 albertel 67: }
68:
69: sub end_awarddetail {
1.3 ! albertel 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;
1.1 albertel 77: }
78:
79: sub start_message {
1.3 ! albertel 80: my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
! 81: my $result;
! 82: if ($target eq 'grade') { &Apache::lonxml::startredirection(); }
! 83: return $result;
1.1 albertel 84: }
85:
86: sub end_message {
1.3 ! albertel 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;
1.1 albertel 94: }
95:
96: 1;
97: __END__
98:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>