--- loncom/auth/lonlogin.pm 2005/04/07 06:56:21 1.63 +++ loncom/auth/lonlogin.pm 2005/04/28 01:19:20 1.64 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.63 2005/04/07 06:56:21 albertel Exp $ +# $Id: lonlogin.pm,v 1.64 2005/04/28 01:19:20 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -179,22 +179,36 @@ ENDFAILED if ($logtoken eq 'con_lost') { my $spares=''; - - foreach my $hostid (keys(%Apache::lonnet::spareid)) { + my $last; + foreach my $hostid (sort + { + $Apache::lonnet::hostname{$a} cmp + $Apache::lonnet::hostname{$b}; + } + keys(%Apache::lonnet::spareid)) { next if ($hostid eq $lonhost); + next if ($last eq $Apache::lonnet::hostname{$hostid}); $spares.='
'. $Apache::lonnet::hostname{$hostid}.''. ' (preferred)'.$/; + $last=$Apache::lonnet::hostname{$hostid}; } $spares.= '
'; - foreach my $hostid (keys(%Apache::lonnet::hostname)) { + foreach my $hostid (sort + { + $Apache::lonnet::hostname{$a} cmp + $Apache::lonnet::hostname{$b}; + } + keys(%Apache::lonnet::hostname)) { next if ($hostid eq $lonhost || $Apache::lonnet::spareid{$hostid}); + next if ($last eq $Apache::lonnet::hostname{$hostid}); $spares.='
'. $Apache::lonnet::hostname{$hostid}.''; + $last=$Apache::lonnet::hostname{$hostid}; } $r->print(<