[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 20 Jul 2006 21:48:10 -0000
albertel Thu Jul 20 17:48:10 2006 EDT
Modified files:
/loncom/homework inputtags.pm
Log:
- use the standard function for show_answer detection rather than badly rolling our own BUG#4626
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.203 loncom/homework/inputtags.pm:1.204
--- loncom/homework/inputtags.pm:1.203 Wed Jul 19 16:54:19 2006
+++ loncom/homework/inputtags.pm Thu Jul 20 17:48:07 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.203 2006/07/19 20:54:19 www Exp $
+# $Id: inputtags.pm,v 1.204 2006/07/20 21:48:07 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -283,10 +283,7 @@
$Apache::lonxml::evaluate--;
my $partid=$Apache::inputtags::part;
my $id=$Apache::inputtags::response[-1];
- if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER'
- || lc($Apache::lonhomework::problemstatus) eq 'no'
- || ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER'
- && $Apache::lonhomework::history{"resource.$partid.solved"} !~ /^correct/ )) {
+ if (!&Apache::response::show_answer()) {
my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval);
my $maxlength;
if ($size eq '') { $size=20; } else {