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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 25 Feb 2005 04:56:06 -0000


albertel		Thu Feb 24 23:56:06 2005 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
    /loncom/homework	structuretags.pm 
  Log:
  - creation of a routine for </body>, 3 replaced 189 more to go
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.250 loncom/interface/loncommon.pm:1.251
--- loncom/interface/loncommon.pm:1.250	Thu Feb 17 03:29:42 2005
+++ loncom/interface/loncommon.pm	Thu Feb 24 23:56:05 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.250 2005/02/17 08:29:42 albertel Exp $
+# $Id: loncommon.pm,v 1.251 2005/02/25 04:56:05 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2750,6 +2750,36 @@
 }
 
 ###############################################
+###############################################
+
+=pod
+
+=back
+
+=head1 HTTP Helpers
+
+=over 4
+
+=item * &endbodytag()
+
+Returns a uniform footer for LON-CAPA web pages.
+
+Inputs: 
+
+=over 4
+
+=back
+
+Returns: A uniform footer for LON-CAPA web pages.  
+
+=cut
+
+sub endbodytag {
+    my $endbodytag='</body>';
+    return $endbodytag;
+}
+
+###############################################
 
 =pod
 
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.279 loncom/homework/structuretags.pm:1.280
--- loncom/homework/structuretags.pm:1.279	Fri Feb 11 21:18:08 2005
+++ loncom/homework/structuretags.pm	Thu Feb 24 23:56:05 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.279 2005/02/12 02:18:08 albertel Exp $
+# $Id: structuretags.pm,v 1.280 2005/02/25 04:56:05 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -217,7 +217,7 @@
     return '</td></tr></table><br /><input type="submit" name="submit" value="'.&mt('Submit Changes and Edit').'" />
     <input type="submit" name="submit" value="'.&mt('Submit Changes and View').'" />'.
     &Apache::lonhtmlcommon::htmlareaselectactive(@Apache::lonxml::htmlareafields).
-    "\n</form>\n</body>\n</html>";
+    "\n</form>\n".&Apache::loncommon::endbodytag()."\n</html>";
 }
 
 sub option {
@@ -666,7 +666,7 @@
 		$ENV{'form.answer_output_mode'} ne 'tex') {
 		$result.="</form>";
 		$result.=&Apache::lonhtmlcommon::htmlareaselectactive(@Apache::lonxml::htmlareafields);
-		$result.="</body>\n";
+		$result.=&Apache::loncommon::endbodytag();
 	    }
 	    if ($target eq 'web') {
 		$result.=&Apache::lonxml::xmlend();
@@ -757,7 +757,8 @@
 	$result=&problem_edit_footer();
     } elsif ($target eq 'web' && $$tagstack[0] ne 'problem' &&
 	     $ENV{'request.state'} eq "construct") {
-	$result.='</form></body>'.&Apache::lonxml::xmlend();
+	$result.='</form>'.&Apache::loncommon::endbodytag().
+	    &Apache::lonxml::xmlend();
     }
     if ($$tagstack[0] eq 'library') { &reset_problem_globals('library') };
     return $result;