[LON-CAPA-cvs] cvs: loncom /auth lonauth.pm /interface lonpreferences.pm /xml lonxml.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 26 Feb 2005 05:37:24 -0000


albertel		Sat Feb 26 00:37:24 2005 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
    /loncom/interface	lonpreferences.pm 
    /loncom/auth	lonauth.pm 
  Log:
  - ttm can now be forced on, which means Hi XML, what you mean we really have to be xml now?
     - roles screen with no roles doesn't barf in xml mode
     - viewing a homework problem with an inline remote and no selected roles doesn't baf
     - pref screen to change back to something else doesn't barf
  
  - no guarentees about anything else, not that the remote control in particular is non functional
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.356 loncom/xml/lonxml.pm:1.357
--- loncom/xml/lonxml.pm:1.356	Thu Feb 17 03:34:56 2005
+++ loncom/xml/lonxml.pm	Sat Feb 26 00:37:23 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.356 2005/02/17 08:34:56 albertel Exp $
+# $Id: lonxml.pm,v 1.357 2005/02/26 05:37:23 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -154,11 +154,13 @@
     @htmlareafields=();
     if ($ENV{'browser.mathml'}) {
 	$output='<?xml version="1.0"?>'
-            .'<?xml-stylesheet type="text/css" href="/adm/MathML/mathml.css"?>'
-            .'<!DOCTYPE html SYSTEM "/adm/MathML/mathml.dtd" '
-            .'[<!ENTITY mathns "http://www.w3.org/1998/Math/MathML">]>'
+            #.'<?xml-stylesheet type="text/css" href="/adm/MathML/mathml.css"?>'."\n"
+#            .'<!DOCTYPE html SYSTEM "/adm/MathML/mathml.dtd" '
+            
+#	    .'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [<!ENTITY mathns "http://www.w3.org/1998/Math/MathML">] >'
+	    .'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">'
             .'<html xmlns:math="http://www.w3.org/1998/Math/MathML" ' 
-	    .'xmlns="http://www.w3.org/TR/REC-html40">';
+	    .'xmlns="http://www.w3.org/1999/xhtml">';
     } else {
 	$output='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>';
     }
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.55 loncom/interface/lonpreferences.pm:1.56
--- loncom/interface/lonpreferences.pm:1.55	Fri Feb 25 01:48:00 2005
+++ loncom/interface/lonpreferences.pm	Sat Feb 26 00:37:23 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.55 2005/02/25 06:48:00 albertel Exp $
+# $Id: lonpreferences.pm,v 1.56 2005/02/26 05:37:23 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -190,7 +190,7 @@
     my $pref=&mt('Preferred method to display Math');
     my %mathchoices=('' => 'No Preference',
 		     'tth' => 'TeX to HTML',
-		     #'ttm' => 'TeX to MathML',
+		     'ttm' => 'TeX to MathML',
 		     'jsMath' => 'jsMath',
 		     #'mimetex' => 'Convert to Images'
                      );
@@ -245,6 +245,13 @@
 # Screenname
     my $newtexengine  = $ENV{'form.texengine'};
     $newtexengine=~s/[^\-\w]//g;
+    if ($newtexengine eq 'ttm') {
+	&Apache::lonnet::appenv('browser.mathml' => 1);
+    } else {
+	if ($ENV{'environment.texengine'} eq 'ttm') {
+	    &Apache::lonnet::appenv('browser.mathml' => 0);
+	}
+    }
     my $message='';
     if ($newtexengine) {
         &Apache::lonnet::put('environment',{'texengine' => $newtexengine});
@@ -255,6 +262,8 @@
         &Apache::lonnet::delenv('environment\.texengine');
         $message='Reset preferred math display.';
     }
+
+
     $r->print(<<ENDVCSCREEN);
 </p>
 $message
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.64 loncom/auth/lonauth.pm:1.65
--- loncom/auth/lonauth.pm:1.64	Mon Feb  7 15:33:04 2005
+++ loncom/auth/lonauth.pm	Sat Feb 26 00:37:23 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # User Authentication Module
 #
-# $Id: lonauth.pm,v 1.64 2005/02/07 20:33:04 albertel Exp $
+# $Id: lonauth.pm,v 1.65 2005/02/26 05:37:23 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -108,6 +108,8 @@
 	$FORM{'interface'}=$userenv{'interface'};
     }
     $ENV{'environment.remote'}=$userenv{'remote'};
+    if ($userenv{'texengine'} eq 'ttm') { $clientmathml=1; }
+
 # --------------- Do not trust query string to be put directly into environment
     foreach ('imagesuppress','appletsuppress',
 	     'embedsuppress','fontenhance','blackwhite',