--- loncom/homework/radiobuttonresponse.pm 2005/01/10 19:21:57 1.98 +++ loncom/homework/radiobuttonresponse.pm 2005/01/31 22:00:40 1.99 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # mutliple choice style responses # -# $Id: radiobuttonresponse.pm,v 1.98 2005/01/10 19:21:57 albertel Exp $ +# $Id: radiobuttonresponse.pm,v 1.99 2005/01/31 22:00:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -114,7 +114,7 @@ sub start_foilgroup { } sub storesurvey { - if ( !defined($ENV{'form.submitted'})) { return ''; } + if ( !&Apache::response::submitted() ) { return ''; } my $response = $ENV{'form.HWVAL_'.$Apache::inputtags::response['-1']}; &Apache::lonxml::debug("Here I am!:$response:"); if ( $response !~ /[0-9]+/) { return ''; } @@ -137,7 +137,7 @@ sub grade_response { my ($max,$randomize)=@_; #keep the random numbers the same must always call this my ($answer,@whichfoils)=&whichfoils($max,$randomize); - if (!defined($ENV{'form.submitted'})) { return; } + if ( !&Apache::response::submitted() ) { return; } my $response; if ($ENV{'form.submitted'} eq 'scantron') { $response=&Apache::response::getresponse();