--- loncom/homework/imageresponse.pm 2005/03/16 21:35:17 1.64 +++ loncom/homework/imageresponse.pm 2005/04/19 09:20:55 1.66 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # image click response style # -# $Id: imageresponse.pm,v 1.64 2005/03/16 21:35:17 raeburn Exp $ +# $Id: imageresponse.pm,v 1.66 2005/04/19 09:20:55 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,6 +36,7 @@ use Apache::randomlylabel(); use Apache::londefdef(); use Apache::Constants qw(:common :http); use Apache::lonlocal; +use Apache::lonnet; BEGIN { &Apache::lonxml::register('Apache::imageresponse',('imageresponse')); @@ -227,6 +228,7 @@ sub clean_up_image { } } else { $image=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$image); + &Apache::lonxml::debug("repcopying: $image"); if (&Apache::lonnet::repcopy($image) ne 'ok') { $image='/home/httpd/html/adm/lonKaputt/lonlogo_broken.gif'; } @@ -242,8 +244,8 @@ sub gradefoils { my $id=$Apache::inputtags::response['-1']; my $temp=1; foreach my $name (@whichopt) { - $x=$ENV{"form.HWVAL_$id:$temp.x"}; - $y=$ENV{"form.HWVAL_$id:$temp.y"}; + $x=$env{"form.HWVAL_$id:$temp.x"}; + $y=$env{"form.HWVAL_$id:$temp.y"}; &Apache::lonxml::debug("Got a x of $x and a y of $y for $name"); if (defined($x) && defined($y) && defined(@{ $Apache::response::foilgroup{"$name.area"} })) { @@ -294,7 +296,7 @@ sub end_foilgroup { if ($target eq 'web' || $target eq 'tex') { $result=&displayfoils($target,@whichopt); } elsif ($target eq 'grade') { - if ( defined $ENV{'form.submitted'}) { &gradefoils(@whichopt); } + if ( defined $env{'form.submitted'}) { &gradefoils(@whichopt); } } elsif ( $target eq 'analyze') { &Apache::response::analyze_store_foilgroup(\@whichopt, ['text','image','area']);