--- loncom/homework/response.pm 2008/02/01 22:05:45 1.187 +++ loncom/homework/response.pm 2008/03/06 16:28:20 1.188 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # various response type definitons response definition # -# $Id: response.pm,v 1.187 2008/02/01 22:05:45 raeburn Exp $ +# $Id: response.pm,v 1.188 2008/03/06 16:28:20 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -790,6 +790,8 @@ sub next_answer { sub answer_part { my ($type,$answer,$args) = @_; + &Apache::lonxml::debug("In answerpart :$type:$answer:$args:"); + my $result; if ($env{'form.answer_output_mode'} eq 'tex') { if (!$args->{'no_verbatim'}) { @@ -801,9 +803,13 @@ sub answer_part { last; } } - if ($answer ne '') { - $answer = '\verb'.$to_use.$answer.$to_use; - } + my $answerelements=$answer; + $answer=''; + foreach my $element (split(/[\;\:]/,$answerelements)) { + if ($element ne '') { + $answer.= '\noindent\verb'.$to_use.$element.$to_use.'\newline'; + } + } } if ($answer ne '') { push(@answer_bits,$answer); @@ -813,7 +819,8 @@ sub answer_part { $result .= '