';
+ foreach my $element (@{ $answer }) {
+ $result.= ''.
+ &HTML::Entities::encode($element,'"<>&').' | ';
}
- }
- if ($fmt) { $ans = sprintf('%.'.$fmt,$ans); }
- $result.=&Apache::response::answer_part($$tagstack[-1],$ans);
- }
- if ($unit) {
- $result.=&Apache::response::answer_part($$tagstack[-1],
- ''.$unit.'');
- }
- if ($type || $token->[1] eq 'stringresponse') {
- my $string='Case Insensitive';
- if ($type eq 'mc') {
- $string='Multiple Choice';
- } elsif ($type eq 'cs') {
- $string='Case Sensitive';
- } elsif ($type eq 'ci') {
- $string='Case Insensitive';
- } elsif ($type eq 'fml') {
- $string='Formula';
- }
- $result.=&Apache::response::answer_part($$tagstack[-1],
- ''.$string.'');
- }
- if ($$tagstack[-1] eq 'formularesponse') {
- my $samples=&Apache::lonxml::get_param('samples',$parstack,$safeeval);
- $result.=&Apache::response::answer_part($$tagstack[-1],$samples);
- }
- $result.=&Apache::response::answer_footer($$tagstack[-1]);
- }
- &Apache::response::end_response;
- return $result;
+ $result.='