--- loncom/homework/caparesponse/caparesponse.pm 2002/09/30 18:08:09 1.60 +++ loncom/homework/caparesponse/caparesponse.pm 2002/09/30 18:32:45 1.61 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.60 2002/09/30 18:08:09 sakharuk Exp $ +# $Id: caparesponse.pm,v 1.61 2002/09/30 18:32:45 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -225,7 +225,7 @@ sub end_numericalresponse { if ($target eq 'web') { $result.= ''; for ($ind=0;$ind<$number_of_bubbles;$ind++) { - if (undef @formats) { + if ($formats[0] ne '') { my $ans = sprintf('%.'.$formats[0],$bubbles_values[$ind]); $result.=''; } else { @@ -260,7 +260,7 @@ sub end_numericalresponse { } $result.='}\hline'; for ($ind=$cou;$ind<$cou+$table_range[$j];$ind++) { - if (undef @formats) { + if ($formats[0] ne '') { my $ans = sprintf('%.'.$formats[0],$bubbles_values[$ind]); $result.=' '.$alphabet[$ind].': & '.$ans.' '; } else {
'.$alphabet[$ind].': '.$ans.'