--- loncom/homework/essayresponse.pm 2007/04/17 23:25:09 1.82 +++ loncom/homework/essayresponse.pm 2008/02/01 22:05:45 1.87 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # essay (ungraded) style responses # -# $Id: essayresponse.pm,v 1.82 2007/04/17 23:25:09 albertel Exp $ +# $Id: essayresponse.pm,v 1.87 2008/02/01 22:05:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -148,7 +148,8 @@ sub end_essayresponse { my ($symb,$crsid,$domain,$name)= &Apache::lonnet::whichuser(); if ($crsid) { - my $akey=$name.'.'.$domain.'.'.$crsid; + my $akey=join('.',&escape($name),&escape($domain), + &escape($crsid)); my $essayurl= &Apache::lonnet::declutter($ENV{'REQUEST_URI'}); my ($adom,$aname,$apath)= @@ -183,7 +184,12 @@ sub end_essayresponse { if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || $target eq 'tex' || $target eq 'analyze') { - &Apache::lonxml::increment_counter($increment); + &Apache::lonxml::increment_counter($increment, "$part.$id"); + + if ($target eq 'analyze') { + $Apache::lonhomework::analyze{"$part.$id.type"} = 'essayresponse'; + &Apache::lonhomework::set_bubble_lines(); + } } &Apache::response::end_response; @@ -245,7 +251,7 @@ sub file_submission { $uploadedfiletypes=','.$uploadedfiletypes.','; foreach my $file (@submitted_files) { my ($extension)=($file=~/\.(\w+)$/); - unless ($uploadedfiletypes=~/\,$extension\,/i) { + unless ($uploadedfiletypes=~/\,\s*\Q$extension\E\s*\,/i) { $$award='INVALID_FILETYPE'; } }