--- loncom/homework/caparesponse/caparesponse.pm 2004/02/13 15:09:52 1.129 +++ loncom/homework/caparesponse/caparesponse.pm 2004/02/13 21:05:34 1.130 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.129 2004/02/13 15:09:52 www Exp $ +# $Id: caparesponse.pm,v 1.130 2004/02/13 21:05:34 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -392,8 +392,14 @@ sub get_table_sizes { if ($cell_width_real>$cell_width) {$cell_width=$cell_width_real;} } $cell_width+=8; - $ENV{'form.textwidth'}=~/(\d+)/; - my $textwidth=$1; + my $textwidth; + if ($ENV{'form.textwidth'} ne '') { + $ENV{'form.textwidth'}=~/(\d+)/; + $textwidth=$1; + } else { + $ENV{'textwidth'}=~/(\d+)/; + $textwidth=$1; + } my $bubbles_per_line=int($textwidth/$cell_width); my $number_of_tables = int($number_of_bubbles/$bubbles_per_line); my @table_range = ();