--- loncom/homework/essayresponse.pm 2006/10/17 15:11:11 1.77 +++ loncom/homework/essayresponse.pm 2007/01/08 11:12:44 1.81 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # essay (ungraded) style responses # -# $Id: essayresponse.pm,v 1.77 2006/10/17 15:11:11 albertel Exp $ +# $Id: essayresponse.pm,v 1.81 2007/01/08 11:12:44 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -31,7 +31,6 @@ use strict; use Apache::lonxml(); use Apache::lonnet; use Apache::lonlocal; -use lib '/home/httpd/lib/perl/'; use LONCAPA; @@ -153,7 +152,7 @@ sub end_essayresponse { my $essayurl= &Apache::lonnet::declutter($ENV{'REQUEST_URI'}); my ($adom,$aname,$apath)= - ($essayurl=~/^(\w+)\/(\w+)\/(.*)$/); + ($essayurl=~/^($LONCAPA::domain_re)\/($LONCAPA::username_re)\/(.*)$/); $apath=&escape($apath); $apath=~s/\W/\_/gs; &Apache::lonnet::put('nohist_essay_'.$apath, @@ -170,18 +169,11 @@ sub end_essayresponse { $result .= &Apache::inputtags::exam_score_line($target); } elsif ($target eq 'answer') { - if ($env{'form.answer_output_mode'} eq 'tex') { - $result .= '\begin{tabular}{|l|}'; - $result .= '\hline'; - $result .= ' Answer for essay will be hand graded \\\\ '; - $result .= '\\hline'; - $result .= '\end{tabular}'; - $result .= '\vskip 3mm'; - } else { - $result.=&Apache::response::answer_header($$tagstack[-1]); - $result.=&Apache::response::answer_part($$tagstack[-1],''); - $result.=&Apache::response::answer_footer($$tagstack[-1]); - } + $result.=&Apache::response::answer_header($$tagstack[-1]); + my $answer = &mt('Essay will be hand graded.'); + $result.=&Apache::response::answer_part($$tagstack[-1],$answer, + {'no_verbatim' => 1}); + $result.=&Apache::response::answer_footer($$tagstack[-1]); } if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ||