[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm /xml run.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 24 Jun 2002 21:23:27 -0000
albertel Mon Jun 24 17:23:27 2002 EDT
Modified files:
/loncom/homework inputtags.pm
/loncom/xml run.pm
Log:
- fixes BUG#494 (Don't interpolate students reponse)
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.56 loncom/homework/inputtags.pm:1.57
--- loncom/homework/inputtags.pm:1.56 Mon Apr 1 16:26:57 2002
+++ loncom/homework/inputtags.pm Mon Jun 24 17:23:26 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.56 2002/04/01 21:26:57 albertel Exp $
+# $Id: inputtags.pm,v 1.57 2002/06/24 21:23:26 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -78,6 +78,7 @@
my $id = &start_input($parstack,$safeeval);
my $resid=$Apache::inputtags::response[-1];
if ($target eq 'web') {
+ $Apache::lonxml::evaluate--;
my $partid=$Apache::inputtags::part;
my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$resid.submission"});
my $cols = &Apache::lonxml::get_param('cols',$parstack,$safeeval);
@@ -108,6 +109,7 @@
sub end_textfield {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
if ($target eq 'web') {
+ $Apache::lonxml::evaluate++;
if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
return "</textarea>";
}
@@ -120,6 +122,7 @@
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
my $result = "";
if ($target eq 'web') {
+ $Apache::lonxml::evaluate--;
my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval);
if ($size eq '') { $size=20; }
my $partid=$Apache::inputtags::part;
@@ -144,7 +147,8 @@
sub end_textline {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
- if ($target eq 'edit') { return ('','no'); }
+ if ($target eq 'web') { $Apache::lonxml::evaluate++; }
+ elsif ($target eq 'edit') { return ('','no'); }
return "";
}
Index: loncom/xml/run.pm
diff -u loncom/xml/run.pm:1.30 loncom/xml/run.pm:1.31
--- loncom/xml/run.pm:1.30 Fri May 24 12:48:50 2002
+++ loncom/xml/run.pm Mon Jun 24 17:23:26 2002
@@ -1,6 +1,6 @@
package Apache::run;
#
-# $Id: run.pm,v 1.30 2002/05/24 16:48:50 albertel Exp $
+# $Id: run.pm,v 1.31 2002/06/24 21:23:26 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -39,7 +39,7 @@
sub evaluate {
my ($expression,$safeeval,$decls) = @_;
unless (defined($expression)) { return ''; }
- if (!$Apache::lonxml::evaluate) { return $expression; }
+ if ($Apache::lonxml::evaluate < 1) { return $expression; }
my $result = '';
$@='';
if ($Apache::lonxml::request) {