--- loncom/auth/lonlogin.pm 2010/03/05 17:37:21 1.106.4.6
+++ loncom/auth/lonlogin.pm 2009/10/21 12:29:40 1.128
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Login Screen
#
-# $Id: lonlogin.pm,v 1.106.4.6 2010/03/05 17:37:21 raeburn Exp $
+# $Id: lonlogin.pm,v 1.128 2009/10/21 12:29:40 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -83,7 +83,7 @@ sub handler {
&Apache::loncommon::end_page();
my $dest = '/adm/roles';
if ($env{'form.firsturl'} ne '') {
- $dest = $env{'form.firsturl'};
+ $dest = $env{'form.firsturl'};
}
$r->print(
$start_page
@@ -106,21 +106,24 @@ sub handler {
# ----------------------------------------------------------- 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=
&Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL'));
+ my $lonhost = $r->dir_config('lonHostID');
my $domain = &Apache::lonnet::default_login_domain();
+ my %domconfhash = &Apache::loncommon::get_domainconf($domain);
+ if ($lonhost ne '') {
+ my $loginvia = $domconfhash{$domain.'.login.loginvia_'.$lonhost};
+ if (($loginvia ne '') && ($loginvia ne $lonhost)) {
+ if (&Apache::lonnet::hostname($loginvia) ne '') {
+ $r->print(&redirect_page($loginvia));
+ return OK;
+ }
+ }
+ }
+
if (($env{'form.domain'}) &&
(&Apache::lonnet::domain($env{'form.domain'},'description'))) {
$domain=$env{'form.domain'};
@@ -128,7 +131,6 @@ sub handler {
my $role = $r->dir_config('lonRole');
my $loadlim = $r->dir_config('lonLoadLim');
my $servadm = $r->dir_config('lonAdmEMail');
- my $lonhost = $r->dir_config('lonHostID');
my $tabdir = $r->dir_config('lonTabDir');
my $include = $r->dir_config('lonIncludes');
my $expire = $r->dir_config('lonExpire');
@@ -218,461 +220,288 @@ sub handler {
' '.&mt('(preferred)').''.$/;
$last=$hostname;
}
- $spares.= '
';
- my %all_hostnames = &Apache::lonnet::all_hostnames();
- foreach my $hostid (sort
- {
- &Apache::lonnet::hostname($a) cmp
- &Apache::lonnet::hostname($b);
- }
- keys(%all_hostnames)) {
- next if ($hostid eq $lonhost || $Apache::lonnet::spareid{$hostid});
- my $hostname = &Apache::lonnet::hostname($hostid);
- next if ($last eq $hostname);
- $spares.='
'.
- $hostname.'';
- $last=$hostname;
- }
- $r->print(
- ''
- .'
'.&mt('Please attempt to login to one of the following servers:').'
' - .$spares - .'' - .'' - ); - return OK; - } +$spares.= ''.&mt('Please attempt to login to one of the following servers:').'
' + .$spares + .'' + .'' +); +return OK; +} # ----------------------------------------------- Apparently we are in business - $servadm=~s/\,/\
-HEADER
- if ($showbanner) {
- $r->print(< | ||||||||||||||||
- - - | - - - | - - - | - | |||||||||||||
-
|
-
-
- - - - - |
-ENDSTART
- if ($showmainlogo) {
- $r->print(< '; +} +my $logintitle; +if ($loginheader eq 'text') { + $logintitle =' '.$lt{'log'}.''; +} else { + $logintitle = ''; +} - -
- | | |||||||||||||
-ENDTOP
- } else {
- $r->print('The LearningOnline Network with CAPA' - .''.&mt('Text-based Interface Login').'' - .$announcements); - } - $r->print(' +LFORM - -
+
+ $logintitle
+
+
+
+ $loginhelp + $forgotpw + $contactblock $newuserlink - - - -
-
-
- | $announcements |
-
-
-
- | | |||||||||||||
- + $coursecatalog + + +ENDTOP + if ($showmainlogo) { + $r->print(' '."\n"); + } +$r->print(<
+ |
$lt{'dom'}:
|
-
+ |
$domain
|
+ |
$lt{'serv'}:
|
-
+ |
$lonhost ($role)
|
- $lt{'load'}:
+ |
+ $lt{'load'}:
|
-
- $loadpercent%
+ |
+ $loadpercent $lt{'perc'}
|
- $lt{'userload'}:
+ |
+ $lt{'userload'}:
|
-
- $userloadpercent%
+ |
+ $userloadpercent $lt{'perc'}
|
|