[LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf /auth lonlogin.pm

www lon-capa-cvs@mail.lon-capa.org
Mon, 17 Feb 2003 23:26:00 -0000


www		Mon Feb 17 18:26:00 2003 EDT

  Modified files:              
    /loncom	loncapa_apache.conf 
    /loncom/auth	lonlogin.pm 
  Log:
  Tell people what they are looking at
  Add configuration item for non-graphical browsers
  Should probably have another one for "not supported" browsers
  
  
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.33 loncom/loncapa_apache.conf:1.34
--- loncom/loncapa_apache.conf:1.33	Thu Feb 13 10:52:53 2003
+++ loncom/loncapa_apache.conf	Mon Feb 17 18:25:59 2003
@@ -1,7 +1,7 @@
 ##
 ## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
 ##
-## $Id: loncapa_apache.conf,v 1.33 2003/02/13 15:52:53 www Exp $
+## $Id: loncapa_apache.conf,v 1.34 2003/02/17 23:25:59 www Exp $
 ##
 
 #
@@ -708,6 +708,7 @@
 PerlSetVar       lonDocRoot   /home/httpd/html
 PerlSetVar       lonIncludes  /home/httpd/html/res/adm/includes
 PerlSetVar       lonBrowsDet  netscape:mozilla:msie:mozilla\/(\d+\.\d+)\s:9999:9999&explorer:msie:netscape:msie\s(\d+\.\d+)\;:9999:9999&mozilla:mozilla\/[5-9]:msie:mozilla\/(\d+\.\d+)\s:9999:1&amaya:amaya:mozilla:V(\d+\.\d+)\s:1:1
+PerlSetVar       lonTextBrowsers opera:windows ce:lynx
 
 # -----------------------------------------------------------------------------
 # NOTE: lonSqlAccess key is the password for the MySQL user
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.31 loncom/auth/lonlogin.pm:1.32
--- loncom/auth/lonlogin.pm:1.31	Tue Feb  4 11:03:25 2003
+++ loncom/auth/lonlogin.pm	Mon Feb 17 18:25:59 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.31 2003/02/04 16:03:25 www Exp $
+# $Id: lonlogin.pm,v 1.32 2003/02/17 23:25:59 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -52,8 +52,18 @@
     &Apache::loncommon::get_unprocessed_cgi
      ($ENV{'QUERY_STRING'},['interface','username','domain','firsturl']);
 
+# ----------------------------------------------------------- Process Interface
     $ENV{'form.interface'}=~s/\W//g;
 
+    my $textbrowsers=$r->dir_config('lonTextBrowsers');
+    my $httpbrowser=$ENV{"HTTP_USER_AGENT"};
+    
+    foreach (split(/\:/,$textbrowsers)) {
+	if ($httpbrowser=~/$_/i) {
+	    $ENV{'form.interface'}='textual';
+        }
+    }
+
     my $fullgraph=($ENV{'form.interface'} ne 'textual');
 
     my $iconpath= 'http://'.$ENV{'HTTP_HOST'}.':8080'.
@@ -268,6 +278,8 @@
    <!-- Row 4 Column 1 -->
    <td align="center" valign="middle" bgcolor="$sidebg">
 ENDTOP
+} else {
+    $r->print('<font color="#FFFFFF"><h1>The Learning<i>Online</i> Network with CAPA</h1><h3>Text-based Interface Login</h3></font>');
 }
     $r->print(<<ENDLOGIN);
     <form name="client" onsubmit="return(send())">