--- loncom/homework/inputtags.pm 2008/03/03 19:37:27 1.240 +++ loncom/homework/inputtags.pm 2008/03/17 15:40:31 1.242 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.240 2008/03/03 19:37:27 www Exp $ +# $Id: inputtags.pm,v 1.242 2008/03/17 15:40:31 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -306,7 +306,9 @@ sub start_textline { $oldresponse = $oldresponse->[$#Apache::inputtags::inputlist]; } $oldresponse = &HTML::Entities::encode($oldresponse,'<>&"'); - + $oldresponse =~ s/^\s+//; + $oldresponse =~ s/\s+$//; + $oldresponse =~ s/\s+/ /g; if ($Apache::lonhomework::type ne 'exam') { my $addchars=&Apache::lonxml::get_param('addchars',$parstack,$safeeval); $result=''; @@ -743,10 +745,10 @@ sub decideoutput { $css_class=$possible_class{'not_charged_try'}; $button=1; } elsif ($award eq 'MISORDERED_RANK') { - $message = &mt('You have provided an invalid ranking'); - if ($target ne 'tex') { - $message.=', '.&mt('please refer to').' '.&Apache::loncommon::help_open_topic('Ranking_Problems',&mt('help on ranking problems')); - } + $message = &mt('You have provided an invalid ranking.'); + if ($target ne 'tex') { + $message.=' '.&mt('Please refer to [_1]',&Apache::loncommon::help_open_topic('Ranking_Problems',&mt('help on ranking problems'))); + } $css_class=$possible_class{'not_charged_try'}; $button=1; } elsif ($award eq 'INVALID_FILETYPE') {