[LON-CAPA-cvs] cvs: loncom /homework matchresponse.pm radiobuttonresponse.pm rankresponse.pm /homework/caparesponse caparesponse.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 07 Oct 2004 20:28:30 -0000
albertel Thu Oct 7 16:28:30 2004 EDT
Modified files:
/loncom/homework matchresponse.pm radiobuttonresponse.pm
rankresponse.pm
/loncom/homework/caparesponse caparesponse.pm
Log:
- bug#2730, answeriscomputed attribute now exists for match,rank,radiobutton,string,formula,numercial responses
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.45 loncom/homework/matchresponse.pm:1.46
--- loncom/homework/matchresponse.pm:1.45 Thu Oct 7 14:06:05 2004
+++ loncom/homework/matchresponse.pm Thu Oct 7 16:28:30 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Full matching style response
#
-# $Id: matchresponse.pm,v 1.45 2004/10/07 18:06:05 albertel Exp $
+# $Id: matchresponse.pm,v 1.46 2004/10/07 20:28:30 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -591,6 +591,9 @@
my $result='';
if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') {
&Apache::lonxml::startredirection;
+ if ($target eq 'analyze') {
+ &Apache::response::check_if_computed($token,$parstack,$safeeval,'value');
+ }
} elsif ($target eq 'edit') {
$result=&Apache::edit::tag_start($target,$token,"Foil");
my $level='-2';
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.94 loncom/homework/radiobuttonresponse.pm:1.95
--- loncom/homework/radiobuttonresponse.pm:1.94 Mon Oct 4 13:41:01 2004
+++ loncom/homework/radiobuttonresponse.pm Thu Oct 7 16:28:30 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# mutliple choice style responses
#
-# $Id: radiobuttonresponse.pm,v 1.94 2004/10/04 17:41:01 matthew Exp $
+# $Id: radiobuttonresponse.pm,v 1.95 2004/10/07 20:28:30 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -562,6 +562,9 @@
my $result='';
if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') {
&Apache::lonxml::startredirection;
+ if ($target eq 'analyze') {
+ &Apache::response::check_if_computed($token,$parstack,$safeeval,'value');
+ }
} elsif ($target eq 'edit') {
$result=&Apache::edit::tag_start($target,$token);
$result.=&Apache::edit::text_arg('Name:','name',$token);
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.38 loncom/homework/rankresponse.pm:1.39
--- loncom/homework/rankresponse.pm:1.38 Thu Sep 9 14:34:29 2004
+++ loncom/homework/rankresponse.pm Thu Oct 7 16:28:30 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# rank style response
#
-# $Id: rankresponse.pm,v 1.38 2004/09/09 18:34:29 albertel Exp $
+# $Id: rankresponse.pm,v 1.39 2004/10/07 20:28:30 albertel Exp $
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -376,6 +376,9 @@
my $result='';
if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') {
&Apache::lonxml::startredirection;
+ if ($target eq 'analyze') {
+ &Apache::response::check_if_computed($token,$parstack,$safeeval,'value');
+ }
} elsif ($target eq 'edit') {
$result=&Apache::edit::tag_start($target,$token,"Foil");
my $level='-2';
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.153 loncom/homework/caparesponse/caparesponse.pm:1.154
--- loncom/homework/caparesponse/caparesponse.pm:1.153 Tue Oct 5 16:18:29 2004
+++ loncom/homework/caparesponse/caparesponse.pm Thu Oct 7 16:28:30 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# caparesponse definition
#
-# $Id: caparesponse.pm,v 1.153 2004/10/05 20:18:29 albertel Exp $
+# $Id: caparesponse.pm,v 1.154 2004/10/07 20:28:30 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -298,6 +298,8 @@
$Apache::lonhomework::analyze{"$part_id.type"} = $tag;
my (@incorrect)=&Apache::lonxml::get_param_var('incorrect',$parstack,$safeeval);
push (@{ $Apache::lonhomework::analyze{"$part_id.incorrect"} }, @incorrect);
+ &Apache::response::check_if_computed($token,$parstack,
+ $safeeval,'answer');
}
if (scalar(@$tagstack)) {
&Apache::response::setup_params($tag,$safeeval);
@@ -654,6 +656,8 @@
if ($target eq 'analyze') {
push (@{ $Apache::lonhomework::analyze{"parts"} },"$part.$id");
$Apache::lonhomework::analyze{"$part.$id.type"} = 'stringresponse';
+ &Apache::response::check_if_computed($token,$parstack,$safeeval,
+ 'answer');
}
&Apache::response::setup_params('stringresponse',$safeeval);
if ($target eq 'answer') {