--- loncom/homework/radiobuttonresponse.pm 2001/12/13 23:36:39 1.32 +++ loncom/homework/radiobuttonresponse.pm 2001/12/14 23:00:52 1.33 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # mutliple choice style responses # -# $Id: radiobuttonresponse.pm,v 1.32 2001/12/13 23:36:39 albertel Exp $ +# $Id: radiobuttonresponse.pm,v 1.33 2001/12/14 23:00:52 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -65,6 +65,7 @@ sub end_radiobuttonresponse { if ($target eq 'edit') { $result=&Apache::edit::end_table(); } &Apache::response::end_response; pop @Apache::lonxml::namespace; + &Apache::lonxml::deregister('Apache::radiobuttonresponse',('foilgroup','foil','conceptgroup')); return $result; } @@ -77,19 +78,17 @@ sub start_foilgroup { } sub storesurvey { - if ( defined $ENV{'form.submitted'}) { - my $response = $ENV{'form.HWVAL'.$Apache::inputtags::response['-1']}; - &Apache::lonxml::debug("Here I am!:$response:"); - if ( $response =~ /[0-9]+/) { - my $id = $Apache::inputtags::response['-1']; - my @whichfoils=@{ $Apache::response::foilgroup{'names'} }; - my %responsehash; - $responsehash{$whichfoils[$response]}=$response; - $Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.submission"}=&Apache::lonnet::hash2str(%responsehash); - $Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.awarddetail"}='SUBMITTED'; - &Apache::lonxml::debug("submitted a $response
\n"); - } - } + if ( !defined($ENV{'form.submitted'})) { return ''; } + my $response = $ENV{'form.HWVAL'.$Apache::inputtags::response['-1']}; + &Apache::lonxml::debug("Here I am!:$response:"); + if ( $response !~ /[0-9]+/) { return ''; } + my $id = $Apache::inputtags::response['-1']; + my @whichfoils=@{ $Apache::response::foilgroup{'names'} }; + my %responsehash; + $responsehash{$whichfoils[$response]}=$response; + $Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.submission"}=&Apache::lonnet::hash2str(%responsehash); + $Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.awarddetail"}='SUBMITTED'; + &Apache::lonxml::debug("submitted a $response
\n"); return ''; }