--- loncom/homework/response.pm 2001/09/14 20:15:35 1.48 +++ loncom/homework/response.pm 2001/11/09 20:20:45 1.50 @@ -9,7 +9,7 @@ package Apache::response; use strict; sub BEGIN { - &Apache::lonxml::register('Apache::response',('responseparam','caparesponse','numericalresponse','stringresponse','radiobuttonresponse','optionresponse','imageresponse','essayresponse','dataresponse')); + &Apache::lonxml::register('Apache::response',('responseparam','caparesponse','numericalresponse','formularesponse','stringresponse','radiobuttonresponse','optionresponse','imageresponse','essayresponse','dataresponse')); } sub start_response { @@ -179,6 +179,13 @@ sub start_stringresponse { return &Apache::caparesponse::start_stringresponse($target,$token,$tagstack,$parstack,$parser,$safeeval,$style); } +sub start_formularesponse { + require Apache::caparesponse; + import Apache::caparesponse; + my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; + return &Apache::caparesponse::start_formularesponse($target,$token,$tagstack,$parstack,$parser,$safeeval,$style); +} + sub start_numericalresponse { require Apache::caparesponse; import Apache::caparesponse; @@ -345,12 +352,12 @@ sub setup_params { sub answer_header { my ($type) = @_; my $result; - if ($type eq 'optionresponse') { + if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse' ) { $result = ''."\n"; } else { - $result = '
Answer for Part:'. $Apache::inputtags::part. '
'."\n"; + $result = '
Answer for Part:'.$Apache::inputtags::part. - '
'."\n"; } return $result; } @@ -358,7 +365,7 @@ sub answer_header { sub answer_part { my ($type,$answer) = @_; my $result; - if ($type eq 'optionresponse') { + if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse') { $result = ''; } else { $result = ''; @@ -369,7 +376,7 @@ sub answer_part { sub answer_footer { my ($type) = @_; my $result; - if ($type eq 'optionresponse') { + if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse') { $result = '
Answer for Part:'. + $Apache::inputtags::part. ''.$answer.''.$answer.'
'; } else { $result = '';