[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 07 Feb 2003 21:50:12 -0000


albertel		Fri Feb  7 16:50:12 2003 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - some CSTR pages were not getting a </html>, XML parsers don't like that
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.144 loncom/homework/structuretags.pm:1.145
--- loncom/homework/structuretags.pm:1.144	Thu Jan  9 14:34:27 2003
+++ loncom/homework/structuretags.pm	Fri Feb  7 16:50:12 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.144 2003/01/09 19:34:27 albertel Exp $
+# $Id: structuretags.pm,v 1.145 2003/02/07 21:50:12 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -449,6 +449,10 @@
     if ($target eq 'grade') { 
       &Apache::lonhomework::showhash(%Apache::lonhomework::results);
       &finalize_storage();
+    }
+    if ($target eq 'answer' && ($ENV{'request.state'} eq 'construct') ) {
+	$result.='</html>'; #normally we get it from xmlend, but in CSTR
+                            # we always show answer mode too.
     }
   } elsif ($target eq 'meta') {
     if ($Apache::inputtags::part eq '0') {