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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 16 Mar 2006 20:08:42 -0000


albertel		Thu Mar 16 15:08:42 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - adding the head_extra to the &head and &headtag
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.306 loncom/interface/loncommon.pm:1.307
--- loncom/interface/loncommon.pm:1.306	Wed Mar 15 14:37:55 2006
+++ loncom/interface/loncommon.pm	Thu Mar 16 15:08:42 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.306 2006/03/15 19:37:55 albertel Exp $
+# $Id: loncommon.pm,v 1.307 2006/03/16 20:08:42 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2959,14 +2959,15 @@
 
 Returns a uniform footer for LON-CAPA web pages.
 
-Inputs: $title - optinal title for the head
+Inputs: $title - optional title for the head
+        $head_extra - optional extra HTML to put inside the <head>
 
 =back
 
 =cut
 
 sub headtag {
-    my ($title) = @_;
+    my ($title,$head_extra) = @_;
     
     my $result = '<head>';
     
@@ -2974,7 +2975,7 @@
 	$title = 'The LearningOnline Network with CAPA';
     }
     
-    $result .= '<title>'.&mt($title).'</title>';
+    $result .= '<title>'.&mt($title).'</title>'.$head_extra;
     
     return $result;
 }
@@ -3006,14 +3007,14 @@
 Returns a uniform complete <head>..</head> section for LON-CAPA web pages.
 
 Inputs: $title - optional title for the page
-
+        $head_extra - optional extra HTML to put inside the <head>
 =back
 
 =cut
 
 sub head {
-    my ($title) = @_;
-    return &headtag($title).&endheadtag();
+    my ($title,$head_extra) = @_;
+    return &headtag($title,$head_extra).&endheadtag();
 }
 
 =pod
@@ -3035,7 +3036,7 @@
     my ($title,$head_extra) = @_;
     return 
 	&Apache::lonxml::xmlbegin().
-	&headtag($title).$head_extra.&endheadtag().
+	&headtag($title,$head_extra).&endheadtag().
 	&bodytag($title);
 }