[LON-CAPA-cvs] cvs: loncom /homework default_homework.lcpm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 26 Sep 2002 21:54:00 -0000


albertel		Thu Sep 26 17:54:00 2002 EDT

  Modified files:              
    /loncom/homework	default_homework.lcpm 
  Log:
  - fixes BUG#547, need to check defined, 0 was blowing things up
  
  
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.52 loncom/homework/default_homework.lcpm:1.53
--- loncom/homework/default_homework.lcpm:1.52	Thu Sep 26 16:46:48 2002
+++ loncom/homework/default_homework.lcpm	Thu Sep 26 17:54:00 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # used by lonxml::xmlparse() as input variable $safeinit to Apache::run::run()
 #
-# $Id: default_homework.lcpm,v 1.52 2002/09/26 20:46:48 albertel Exp $
+# $Id: default_homework.lcpm,v 1.53 2002/09/26 21:54:00 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -101,11 +101,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; }
   }
   my $result = &caparesponse_capa_check_answer($response,$answer,$type,
 					       $tol_type,$tol,