--- loncom/homework/default_homework.lcpm 2001/12/21 21:37:26 1.44 +++ loncom/homework/default_homework.lcpm 2002/01/30 17:32:05 1.45 @@ -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.44 2001/12/21 21:37:26 matthew Exp $ +# $Id: default_homework.lcpm,v 1.45 2002/01/30 17:32:05 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -101,6 +101,11 @@ sub caparesponse_check { $sig_ubound =15; #SIG_UB_DEFAULT } else { ($sig_lbound,$sig_ubound) = split /,/,$sig; + if (!$sig_lbound) { + $sig_lbound = 0; #SIG_LB_DEFAULT + $sig_ubound =15; #SIG_UB_DEFAULT + } + if (!$sig_ubound) { $sig_ubound=$sig_lbound; } } my $result = &caparesponse_capa_check_answer($response,$answer,$type, $tol_type,$tol, @@ -238,6 +243,7 @@ sub random { srand($external::randomseed); $hidden::RANDOMINIT=1; } + if (!defined($step)) { $step=1; } my $num=1+int(($end-$start)/$step); my $result=$start + int(rand() * $num)*$step; return $result;