--- loncom/homework/caparesponse/caparesponse.pm 2004/03/16 19:47:47 1.143 +++ 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.143 2004/03/16 19:47:47 albertel Exp $ +# $Id: caparesponse.pm,v 1.145 2004/06/02 21:23:21 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -271,7 +271,7 @@ sub end_numericalresponse { my $cou=0; $result.='\vskip -1 mm \noindent \begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]'; for (my $i=0;$i<$number_of_tables;$i++) { - $result.='\vskip -1 mm \noindent \begin{tabular}{'; + $result.='\vskip -1 mm \noindent \setlength{\tabcolsep}{2 mm}\begin{tabular}{'; for (my $ind=0;$ind<$table_range[$j];$ind++) { $result.='p{3 mm}p{'.$celllength.' mm}'; } @@ -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) ||