[LON-CAPA-cvs] cvs: loncom /homework externalresponse.pm loncapagrade.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 11 Sep 2007 19:07:02 -0000
albertel Tue Sep 11 15:07:02 2007 EDT
Modified files:
/loncom/homework externalresponse.pm loncapagrade.pm
Log:
- BUG#5419, get <externalresponse> operational again
- xmlparse needs to have parser_env primed
- misspelling in dereister was leaking memory
Index: loncom/homework/externalresponse.pm
diff -u loncom/homework/externalresponse.pm:1.7 loncom/homework/externalresponse.pm:1.8
--- loncom/homework/externalresponse.pm:1.7 Tue Apr 17 20:19:37 2007
+++ loncom/homework/externalresponse.pm Tue Sep 11 15:07:01 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# external style responses
#
-# $Id: externalresponse.pm,v 1.7 2007/04/18 00:19:37 albertel Exp $
+# $Id: externalresponse.pm,v 1.8 2007/09/11 19:07:01 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -79,6 +79,7 @@
} else {
&Apache::lonxml::register('Apache::loncapagrade',
('loncapagrade'));
+ @Apache::scripttag::parser_env = @_;
my $result=&Apache::scripttag::xmlparse($res->{_content});
&Apache::lonxml::debug("Got a result of :$result:");
}
Index: loncom/homework/loncapagrade.pm
diff -u loncom/homework/loncapagrade.pm:1.3 loncom/homework/loncapagrade.pm:1.4
--- loncom/homework/loncapagrade.pm:1.3 Tue Oct 18 10:14:12 2005
+++ loncom/homework/loncapagrade.pm Tue Sep 11 15:07:01 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# external style responses
#
-# $Id: loncapagrade.pm,v 1.3 2005/10/18 14:14:12 albertel Exp $
+# $Id: loncapagrade.pm,v 1.4 2007/09/11 19:07:01 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -31,18 +31,18 @@
#Globals
# results of parse end up in here
-%Apache::loncapagrade::result=();
+undef(%Apache::loncapagrade::results);
BEGIN {
# &Apache::lonxml::register('Apache::loncapagrade',
-# ('loncapagrade','awardetail','message'));
+# ('loncapagrade','awarddetail','message'));
}
sub start_loncapagrade {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
my $result;
if ($target eq 'grade') {
- %Apache::loncapagrade::results=();
+ undef(%Apache::loncapagrade::results);
&Apache::lonxml::register('Apache::loncapagrade',
('awarddetail','message'));
}
@@ -54,7 +54,7 @@
my $result;
if ($target eq 'grade') {
&Apache::lonxml::deregister('Apache::loncapagrade',
- ('loncapagrade','awardetail','message'));
+ ('loncapagrade','awarddetail','message'));
}
return $result;
}