--- loncom/homework/essayresponse.pm	2002/08/01 19:16:45	1.14
+++ loncom/homework/essayresponse.pm	2003/01/13 21:24:02	1.16
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # essay (ungraded) style responses
 #
-# $Id: essayresponse.pm,v 1.14 2002/08/01 19:16:45 albertel Exp $
+# $Id: essayresponse.pm,v 1.16 2003/01/13 21:24:02 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -30,6 +30,7 @@
 #
 package Apache::essayresponse;
 use strict;
+use Apache::lonxml;
 
 BEGIN {
     &Apache::lonxml::register('Apache::essayresponse',('essayresponse'));
@@ -70,6 +71,7 @@ sub end_essayresponse {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $part          = $Apache::inputtags::part;
     my $id            = $Apache::inputtags::response[-1];
+    my $result;
     if ( $target eq 'grade' ) {
 	my $collaborators = $ENV{'form.HWCOL'.$part.'_'.$id};	
 	if ($collaborators =~ /[^\s]/) {
@@ -92,10 +94,19 @@ sub end_essayresponse {
 		&Apache::response::handle_previous(\%previous,$award);
 	    }
 	}
+    } elsif ($target eq 'edit') {
+	$result.=&Apache::edit::end_table();
+    } elsif ($target eq 'tex') {
+	if ($Apache::lonhomework::type eq 'exam') {
+	    $result.='\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Live blank on scoring form}\vskip 0 mm';
+	    &Apache::lonxml::increment_counter();
+	    $result.= '\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Live blank on scoring form}\vskip 0 mm \end{enumerate}';
+	    &Apache::lonxml::increment_counter();
+	}
     }
 
     &Apache::response::end_response;
-    return '';
+    return $result;
 }
 
 sub check_collaborators {