[LON-CAPA-cvs] cvs: loncom /homework response.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 15 Feb 2002 22:16:04 -0000
albertel Fri Feb 15 17:16:04 2002 EDT
Modified files:
/loncom/homework response.pm
Log:
- %Apache::inputtags::params was being overwritten by hints, now start_hintresponse and end_hintresponse use Apache::inputtags::paramstack to save away values.
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.59 loncom/homework/response.pm:1.60
--- loncom/homework/response.pm:1.59 Thu Feb 14 16:48:31 2002
+++ loncom/homework/response.pm Fri Feb 15 17:16:04 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.59 2002/02/14 21:48:31 albertel Exp $
+# $Id: response.pm,v 1.60 2002/02/15 22:16:04 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -62,11 +62,13 @@
my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval);
if ($id eq '') { $id = $Apache::lonxml::curdepth; }
push (@Apache::inputtags::response,$id);
+ push (@Apache::inputtags::paramstack,[%Apache::inputtags::params]);
return $id;
}
sub end_hintresponse {
pop @Apache::inputtags::response;
+ %Apache::inputtags::params=@{pop(@Apache::inputtags::paramstack)};
return '';
}
@@ -356,7 +358,8 @@
$result = &Apache::edit::rebuild_tag($token);
$result.=&Apache::edit::handle_insert();
}
- } elsif ($target eq 'grade' || $target eq 'answer' ) {
+ } elsif ($target eq 'grade' || $target eq 'answer' ||
+ $target eq 'web' || $target eq 'tex') {
if ($ENV{'request.state'} eq 'construct') {
my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
my $default = &Apache::lonxml::get_param('default',$parstack,$safeeval);
@@ -386,7 +389,7 @@
my ($tag) = @_;
if ($ENV{'request.state'} eq 'construct') { return; }
- @Apache::inputtags::params=();
+ %Apache::inputtags::params=();
my %paramlist=();
foreach my $key (keys(%Apache::lonnet::packagetab)) {
if ($key =~ /^$tag/) {