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

www lon-capa-cvs@mail.lon-capa.org
Thu, 23 May 2002 20:00:12 -0000


www		Thu May 23 16:00:12 2002 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
  Log:
  First steps towards accessibility and PDA access
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.15 loncom/auth/lonlogin.pm:1.16
--- loncom/auth/lonlogin.pm:1.15	Sat Mar 23 16:06:54 2002
+++ loncom/auth/lonlogin.pm	Thu May 23 16:00:11 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.15 2002/03/23 21:06:54 www Exp $
+# $Id: lonlogin.pm,v 1.16 2002/05/23 20:00:11 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -46,6 +46,12 @@
     $r->send_http_header;
     return OK if $r->header_only;
 
+
+    &Apache::loncommon::get_unprocessed_cgi
+                         ($ENV{'QUERY_STRING'},['interface']);
+
+    my $fullgraph=($ENV{'form.interface'} ne 'textual');
+
     my $iconpath= $r->dir_config('lonIconsURL');
     my $domain  = $r->dir_config('lonDefDomain');
     my $role    = $r->dir_config('lonRole');
@@ -108,7 +114,7 @@
         $r->print(<$jsh>);
     }
 # ---------------------------------------------------------- Serve rest of page
-    $r->print(<<ENDDOCUMENT);
+    $r->print(<<ENDSCRIPT);
 
 <body bgcolor="#006600" text="#000000" link="#999999" vlink="#999999"
  onLoad="init();" topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>
@@ -132,10 +138,14 @@
         this.document.server.submit();
     }
  </script>
+ENDSCRIPT
 
- <!-- The Main Table -->
- <table width="100%" cellpadding=0 cellspacing=0 border=0>
+    if ($fullgraph) {
+	$r->print(
+		  '<table width="100%" cellpadding=0 cellspacing=0 border=0>');
+    }
 
+    $r->print(<<ENDSERVERFORM);
   <form name="server" action="$otherserver/adm/authenticate" method="post" target="_top">
    <input type=hidden name=logtoken value="$logtoken">
    <input type=hidden name=serverid value="$lonhost">
@@ -143,7 +153,8 @@
    <input type=hidden name=upass value="">
    <input type=hidden name=udom value="">
   </form>
-
+ENDSERVERFORM
+    if ($fullgraph) { $r->print(<<ENDTOP);
   <!-- The LON-CAPA Header -->
   <tr>
 
@@ -171,7 +182,7 @@
    <!-- A cell that will hold the 'access' and 'about' buttons -->
    <!-- Row 3 Column 1 -->
    <td valign="top" height=60 align="center" bgcolor="#cccccc">
-    <a href="/adm/accessibility.html"><img src="$iconpath/accessbutton.gif" border=0 /></a>
+    <a href="/adm/login?interface=textual"><img src="$iconpath/accessbutton.gif" border=0 /></a>
     <br />
     <a href="/adm/about.html"><img src="$iconpath/aboutlon.gif" border=0 /></a>
    </td>
@@ -196,6 +207,9 @@
    <!-- The entry form -->
    <!-- Row 4 Column 1 -->
    <td align="center" valign="middle" bgcolor="#cccccc">
+ENDTOP
+}
+    $r->print(<<ENDLOGIN);
     <form name="client">
      <input type="hidden" name="lextkey" value="$lextkey">
      <input type="hidden" name="uextkey" value="$uextkey">
@@ -223,8 +237,10 @@
       </tr>
      </table>
      <!-- End sub-table -->
-
     </form>
+ENDLOGIN
+    if ($fullgraph) {
+	$r->print(<<ENDDOCUMENT);
    </td>
 
    <!-- Row 4 Column 2 -->
@@ -297,10 +313,10 @@
    <td align="right" background="$iconpath/fillbottom.gif"><img src="$iconpath/lowerright.gif" /></td>
   </tr>
  </table>
-</body>
-</html>
 
 ENDDOCUMENT
+}
+    $r->print('</body></html>');
     return OK;
 }