[LON-CAPA-cvs] cvs: loncom /homework/caparesponse caparesponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 02 Jun 2004 21:23:22 -0000


albertel		Wed Jun  2 17:23:22 2004 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  - acted oddly with a sig range of 0,something
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.144 loncom/homework/caparesponse/caparesponse.pm:1.145
--- loncom/homework/caparesponse/caparesponse.pm:1.144	Tue Apr  6 11:54:35 2004
+++ loncom/homework/caparesponse/caparesponse.pm	Wed Jun  2 17:23:21 2004
@@ -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 @@
 	    }
 	    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 @@
 	$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) ||