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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 29 Aug 2002 21:21:10 -0000


albertel		Thu Aug 29 17:21:10 2002 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - stupidly sending out headers in tex mode, not a good idea
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.108 loncom/homework/structuretags.pm:1.109
--- loncom/homework/structuretags.pm:1.108	Mon Aug 26 17:01:52 2002
+++ loncom/homework/structuretags.pm	Thu Aug 29 17:21:09 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.108 2002/08/26 21:01:52 albertel Exp $
+# $Id: structuretags.pm,v 1.109 2002/08/29 21:21:09 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -450,9 +450,11 @@
 
 sub start_library {
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
-  my ($result,$head_tag_start,$body_tag_start,$form_tag_start)=
-    &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval);
+  my ($result,$head_tag_start,$body_tag_start,$form_tag_start);
+
   if ($target eq 'edit') {
+    ($result,$head_tag_start,$body_tag_start,$form_tag_start)=
+      &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval);
     $result.=$head_tag_start."</head>".$body_tag_start.$form_tag_start.
       &problem_edit_header();
     my $temp=&Apache::edit::insertlist($target,$token);
@@ -461,6 +463,8 @@
     $result=$token->[4];
     $result.=&Apache::edit::handle_insert();
   } elsif ($target eq 'web' && $ENV{'request.state'} eq "construct" ) {
+    ($result,$head_tag_start,$body_tag_start,$form_tag_start)=
+      &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval);
     my $name=&get_resource_name($parstack,$safeeval);
     my $rndseed=&setup_rndseed($safeeval);
     $result.="$head_tag_start<title>$name</title></head>