--- loncom/homework/caparesponse/caparesponse.pm 2003/10/15 19:54:45 1.107.2.2
+++ loncom/homework/caparesponse/caparesponse.pm 2003/08/21 17:33:22 1.108
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# caparesponse definition
#
-# $Id: caparesponse.pm,v 1.107.2.2 2003/10/15 19:54:45 albertel Exp $
+# $Id: caparesponse.pm,v 1.108 2003/08/21 17:33:22 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -169,7 +169,10 @@ sub end_numericalresponse {
$safeeval);
my $award = $Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"};
my $status = $Apache::inputtags::status['-1'];
- if ( &Apache::response::show_answer() ) {
+ if ( ($award =~ /^correct/
+ && lc($Apache::lonhomework::problemstatus) ne 'no')
+ || $status eq "SHOW_ANSWER"
+ || $ENV{'form.texaward'} eq 'SHOW_ANSWER') {
my (@formats)=&Apache::lonxml::get_param_var('format',$parstack,
$safeeval);
my $unit=&Apache::lonxml::get_param_var('unit',$parstack,
@@ -231,16 +234,11 @@ sub end_numericalresponse {
if ($$tagstack[-1] eq 'numericalresponse') {
if ($unit=~/\S/) {$result.=' (in '.$unit.')
';}
$result.= '
'.$alphabet[$ind].': '. - $bubble_values[$ind].' | '; + '" value="'.$bubble_values[$ind].'">'. + $alphabet[$ind].': '. + $bubble_values[$ind].''; } $result.='