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

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 10 Aug 2004 18:55:13 -0000


matthew		Tue Aug 10 14:55:13 2004 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
  Log:
  When not talking to lond, list the preferred servers first and a little
  larger than the other servers.
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.57 loncom/auth/lonlogin.pm:1.58
--- loncom/auth/lonlogin.pm:1.57	Fri May  7 10:25:17 2004
+++ loncom/auth/lonlogin.pm	Tue Aug 10 14:55:13 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.57 2004/05/07 14:25:17 matthew Exp $
+# $Id: lonlogin.pm,v 1.58 2004/08/10 18:55:13 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -179,15 +179,22 @@
 
     if ($logtoken eq 'con_lost') {
         my $spares='';
-        foreach (keys %Apache::lonnet::hostname) {
-            if ($_ ne $lonhost) {
-               $spares.='<br /><a href="http://'.$Apache::lonnet::hostname{$_}.
-		 '/adm/login?domain='.$authdomain.'">'.
-                 $Apache::lonnet::hostname{$_}.'</a>';
-               if ($Apache::lonnet::spareid{$_}) {
-		   $spares.=' (preferred)';
-               }
-	   }
+
+        foreach my $hostid (keys(%Apache::lonnet::spareid)) {
+            next if ($hostid eq $lonhost);
+            $spares.='<br /><font size="+1"><a href="http://'.
+                $Apache::lonnet::hostname{$hostid}.
+                '/adm/login?domain='.$authdomain.'">'.
+                $Apache::lonnet::hostname{$hostid}.'</a>'.
+                ' (preferred)</font>'.$/;
+        }
+        $spares.= '<br />';
+        foreach my $hostid (keys(%Apache::lonnet::hostname)) {
+            next if ($hostid eq $lonhost || $Apache::lonnet::spareid{$hostid});
+            $spares.='<br /><a href="http://'.
+                $Apache::lonnet::hostname{$hostid}.
+                '/adm/login?domain='.$authdomain.'">'.
+                $Apache::lonnet::hostname{$hostid}.'</a>';
         }
 	$r->print(<<ENDTROUBLE);
 <html>