--- loncom/homework/caparesponse/caparesponse.pm 2004/04/06 15:54:35 1.144 +++ loncom/homework/caparesponse/caparesponse.pm 2004/06/02 21:23:21 1.145 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.144 2004/04/06 15:54:35 sakharuk Exp $ +# $Id: caparesponse.pm,v 1.145 2004/06/02 21:23:21 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -341,7 +341,7 @@ sub end_numericalresponse { } if ($target eq 'answer') { if ($high && $tag eq 'numericalresponse') { $ans.=' ['.$low.','.$high.']'; } - if ($sighigh && $tag eq 'numericalresponse') { + if (defined($sighigh) && $tag eq 'numericalresponse') { if ($ENV{'form.answer_output_mode'} eq 'tex') { $ans.= " Sig $siglow - $sighigh"; } else { @@ -527,11 +527,11 @@ sub get_sigrange { $sig_ubound =15; #SIG_UB_DEFAULT } else { ($sig_lbound,$sig_ubound) = split(/,/,$sig); - if (!$sig_lbound) { + if (!defined($sig_lbound)) { $sig_lbound = 0; #SIG_LB_DEFAULT $sig_ubound =15; #SIG_UB_DEFAULT } - if (!$sig_ubound) { $sig_ubound=$sig_lbound; } + if (!defined($sig_ubound)) { $sig_ubound=$sig_lbound; } } if (($sig_ubound<$sig_lbound) || ($sig_lbound > 15) ||