--- loncom/homework/grades.pm	2004/08/06 22:09:22	1.204.2.2
+++ loncom/homework/grades.pm	2004/09/24 21:08:27	1.204.2.4
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.204.2.2 2004/08/06 22:09:22 albertel Exp $
+# $Id: grades.pm,v 1.204.2.4 2004/09/24 21:08:27 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4638,9 +4638,10 @@ SCANTRONFORM
 		$form{'CODE'}=$scan_record->{'scantron.CODE'};
 	    }
 	    my $result=&Apache::lonnet::ssi($resource->src(),%form);
-
+	    if (&Apache::loncommon::connection_aborted($r)) { last; }
 	}
 	$completedstudents{$uname}={'line'=>$line};
+	if (&Apache::loncommon::connection_aborted($r)) { last; }
     } continue {
 	&Apache::lonnet::delenv('form.counter');
 	&Apache::lonnet::delenv('scantron\.');
@@ -5106,8 +5107,7 @@ sub send_header {
 
 sub send_footer {
     my ($request)= @_;
-    $request->print('</body>');
-    $request->print(&Apache::lontexconvert::footer());
+    $request->print('</body></html>');
 }
 
 1;