--- loncom/auth/lonlogin.pm 2007/01/14 02:00:04 1.87 +++ loncom/auth/lonlogin.pm 2007/03/02 23:17:48 1.88 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.87 2007/01/14 02:00:04 raeburn Exp $ +# $Id: lonlogin.pm,v 1.88 2007/03/02 23:17:48 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -138,7 +138,7 @@ ENDFAILED my $include = $r->dir_config('lonIncludes'); my $expire = $r->dir_config('lonExpire'); my $version = $r->dir_config('lonVersion'); - my $host_name = $Apache::lonnet::hostname{$lonhost}; + my $host_name = &Apache::lonnet::hostname($lonhost); # --------------------------------------------- Default values for login fields @@ -200,33 +200,36 @@ ENDFAILED my $last; foreach my $hostid (sort { - $Apache::lonnet::hostname{$a} cmp - $Apache::lonnet::hostname{$b}; + &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}); + my $hostname = &Apache::lonnet::hostname($hostid); + next if ($last eq $hostname); $spares.='
'. - $Apache::lonnet::hostname{$hostid}.''. + $hostname.''. ' (preferred)'.$/; - $last=$Apache::lonnet::hostname{$hostid}; + $last=$hostname; } $spares.= '
'; + my %all_hostnames = &Apache::lonnet::all_hostnames(); foreach my $hostid (sort { - $Apache::lonnet::hostname{$a} cmp - $Apache::lonnet::hostname{$b}; + &Apache::lonnet::hostname($a) cmp + &Apache::lonnet::hostname($b); } - keys(%Apache::lonnet::hostname)) { + keys(%all_hostnames)) { next if ($hostid eq $lonhost || $Apache::lonnet::spareid{$hostid}); - next if ($last eq $Apache::lonnet::hostname{$hostid}); + my $hostname = &Apache::lonnet::hostname($hostid); + next if ($last eq $hostname); $spares.='
'. - $Apache::lonnet::hostname{$hostid}.''; - $last=$Apache::lonnet::hostname{$hostid}; + $hostname.''; + $last=$hostname; } $r->print(<