--- loncom/homework/optionresponse.pm 2004/02/12 15:50:01 1.99 +++ loncom/homework/optionresponse.pm 2004/02/13 21:01:11 1.100 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: optionresponse.pm,v 1.99 2004/02/12 15:50:01 sakharuk Exp $ +# $Id: optionresponse.pm,v 1.100 2004/02/13 21:01:11 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -485,8 +485,14 @@ sub bubbles { my ($result,$head,$line) =('','',''); my $number_of_bubbles = $#opt + 1; my $current_length = 0; - $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; + } for (my $ind=0;$ind<=$number_of_bubbles;$ind++) { my $leftmargin; if ($ind==0) {$leftmargin=6;} else {$leftmargin=10;}