--- loncom/interface/lonhelper.pm 2007/10/02 00:33:02 1.161.2.1 +++ loncom/interface/lonhelper.pm 2007/08/29 00:46:39 1.162 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # .helper XML handler to implement the LON-CAPA helper # -# $Id: lonhelper.pm,v 1.161.2.1 2007/10/02 00:33:02 albertel Exp $ +# $Id: lonhelper.pm,v 1.162 2007/08/29 00:46:39 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1008,6 +1008,9 @@ sub start_message { if (defined($token->[2]{'nextstate'})) { $paramHash->{NEXTSTATE} = $token->[2]{'nextstate'}; } + if (defined($token->[2]{'type'})) { + $paramHash->{TYPE} = $token->[2]{'type'}; + } return ''; } @@ -1023,7 +1026,15 @@ sub end_message { sub render { my $self = shift; - + + if ($self->{TYPE} =~ /^\s*warning\s*$/i) { + $self->{MESSAGE_TEXT} = + ''. $self->{MESSAGE_TEXT}.''; + } + if ($self->{TYPE} =~ /^\s*error\s*$/i) { + $self->{MESSAGE_TEXT} = + ''. $self->{MESSAGE_TEXT}.''; + } return $self->{MESSAGE_TEXT}; } # If a NEXTSTATE was given, switch to it @@ -1477,7 +1488,7 @@ BUTTONS $choiceLabel = &$choiceLabel($helper, $self); } $result .= "/> ".qq{"; + &mtn($choiceLabel). ""; if ($choice->[4]) { $result .='