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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 18 Apr 2006 20:50:46 -0000


albertel		Tue Apr 18 16:50:46 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
    /loncom/xml	lonxml.pm 
  Log:
  - move fontsetting to be with start/end_page
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.339 loncom/interface/loncommon.pm:1.340
--- loncom/interface/loncommon.pm:1.339	Tue Apr 18 15:18:17 2006
+++ loncom/interface/loncommon.pm	Tue Apr 18 16:50:30 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.339 2006/04/18 19:18:17 albertel Exp $
+# $Id: loncommon.pm,v 1.340 2006/04/18 20:50:30 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3076,7 +3076,7 @@
     
     my $result =
 	'<head>'.
-	&Apache::lonxml::fontsettings().
+	&font_settings().
 	&Apache::lonhtmlcommon::htmlareaheaders();
 
     if ($args->{'force_register'}) {
@@ -3104,6 +3104,33 @@
 
 =over 4
 
+=item * &font_settings()
+
+Returns neccessary <meta> to set the proper encoding
+
+Inputs: none
+
+=back
+
+=cut
+
+sub font_settings {
+    my $headerstring='';
+    if (($env{'browser.os'} eq 'mac') && (!$env{'browser.mathml'})) { 
+	$headerstring.=
+	    '<meta Content-Type="text/html; charset=x-mac-roman" />';
+    } elsif (!$env{'browser.mathml'} && $env{'browser.unicode'}) {
+	$headerstring.=
+	    '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
+    }
+    return $headerstring;
+}
+
+
+=pod
+
+=over 4
+
 =item * &endheadtag()
 
 Returns a uniform </head> for LON-CAPA web pages.
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.407 loncom/xml/lonxml.pm:1.408
--- loncom/xml/lonxml.pm:1.407	Tue Apr 18 16:43:47 2006
+++ loncom/xml/lonxml.pm	Tue Apr 18 16:50:45 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.407 2006/04/18 20:43:47 albertel Exp $
+# $Id: lonxml.pm,v 1.408 2006/04/18 20:50:45 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -304,18 +304,6 @@
     }
 }
 
-sub fontsettings {
-    my $headerstring='';
-    if (($env{'browser.os'} eq 'mac') && (!$env{'browser.mathml'})) { 
-	$headerstring.=
-	    '<meta Content-Type="text/html; charset=x-mac-roman" />';
-    } elsif (!$env{'browser.mathml'} && $env{'browser.unicode'}) {
-	$headerstring.=
-	    '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
-    }
-    return $headerstring;
-}
-
 sub printalltags {
   my $temp;
   foreach $temp (sort keys %Apache::lonxml::alltags) {