--- loncom/homework/optionresponse.pm 2005/01/31 22:00:40 1.124 +++ loncom/homework/optionresponse.pm 2005/04/07 06:56:22 1.125 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: optionresponse.pm,v 1.124 2005/01/31 22:00:40 albertel Exp $ +# $Id: optionresponse.pm,v 1.125 2005/04/07 06:56:22 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -29,6 +29,7 @@ package Apache::optionresponse; use strict; use Apache::response(); use Apache::lonlocal; +use Apache::lonnet; BEGIN { &Apache::lonxml::register('Apache::optionresponse',('optionresponse')); @@ -121,14 +122,14 @@ ENDTABLE my @options; my $optchanged=0; eval '@options ='.&Apache::lonxml::get_param('options',$parstack,$safeeval); - if ($ENV{"form.$Apache::lonxml::curdepth.deleteopt"}) { - my $delopt=$ENV{"form.$Apache::lonxml::curdepth.deleteopt"}; + if ($env{"form.$Apache::lonxml::curdepth.deleteopt"}) { + my $delopt=$env{"form.$Apache::lonxml::curdepth.deleteopt"}; &Apache::lonxml::debug("Deleting :$delopt:"); splice(@options,$delopt-1,1); $optchanged=1; } - if ($ENV{"form.$Apache::lonxml::curdepth.options"}) { - my $newopt = $ENV{"form.$Apache::lonxml::curdepth.options"}; + if ($env{"form.$Apache::lonxml::curdepth.options"}) { + my $newopt = $env{"form.$Apache::lonxml::curdepth.options"}; if ($options[0]) { push(@options,$newopt); } else { @@ -192,7 +193,7 @@ sub end_foilgroup { my $ignored=0; foreach $name (@whichopt) { my $response=&Apache::response::getresponse($temp); - if ($ENV{'form.submitted'} eq 'scantron' && $response=~/\S/) { + if ($env{'form.submitted'} eq 'scantron' && $response=~/\S/) { $response = $opt[$response]; } if ( $response =~ /[^\s]/) { @@ -511,11 +512,11 @@ sub bubbles { my $number_of_bubbles = $#opt + 1; my $current_length = 0; my $textwidth; - if ($ENV{'form.textwidth'} ne '') { - $ENV{'form.textwidth'}=~/(\d+)/; + if ($env{'form.textwidth'} ne '') { + $env{'form.textwidth'}=~/(\d+)/; $textwidth=$1; } else { - $ENV{'textwidth'}=~/(\d*)\.?(\d*)/; + $env{'form.textwidth'}=~/(\d*)\.?(\d*)/; $textwidth=$1.'.'.$2; } for (my $ind=0;$ind<=$number_of_bubbles;$ind++) {