--- loncom/auth/lonlogin.pm 2010/02/09 17:46:44 1.106.4.4 +++ loncom/auth/lonlogin.pm 2009/12/04 13:50:48 1.131 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.106.4.4 2010/02/09 17:46:44 raeburn Exp $ +# $Id: lonlogin.pm,v 1.131 2009/12/04 13:50:48 jms Exp $ # # Copyright Michigan State University Board of Trustees # @@ -83,15 +83,23 @@ sub handler { &Apache::loncommon::end_page(); my $dest = '/adm/roles'; if ($env{'form.firsturl'} ne '') { - $dest = $env{'form.firsturl'}; + $dest = $env{'form.firsturl'}; } + + my $dom = &Apache::lonnet::default_login_domain(); + my %helpconfig = &Apache::lonnet::get_dom('configuration',['helpsettings'],$dom); + + my $loginhelp_page = $helpconfig{'helpsettings'}{'loginhelpurl'}; + if ($loginhelp_page eq '') { + $loginhelp_page = '/adm/loginproblems.html'; + } $r->print( $start_page .'
'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].', '','','','').'
' - .'' - .$end_page + .'' + .$dom.' '.$end_page ); return OK; } @@ -106,21 +114,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 +139,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 +228,291 @@ sub handler { ' '.&mt('(preferred)').''.$/; $last=$hostname; } - $spares.= ''.&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(<'.$lt{'log'}.''; +} else { + $logintitle = ''; +} - -
- | | |||||||||||||||||||||||||||||
-ENDTOP
- } else {
- $r->print('The LearningOnline Network with CAPA' - .''.&mt('Text-based Interface Login').'' - .$announcements); - } - $r->print(' +LFORM - -
+
+ $logintitle
+
-
-
- | $announcements |
-
-
-
-
- |
- | +
+ $loginhelp
+
+ENDTOP
+ if ($showmainlogo) {
+ $r->print(' '."\n");
+ }
+$r->print(<+ $forgotpw + + $contactblock + + $newuserlink + $coursecatalog +
+ |
$lt{'dom'}:
|
-
+ |
$domain
|
+ |
$lt{'serv'}:
|
-
+ |
$lonhost ($role)
|
- $lt{'load'}:
+ |
+ $lt{'load'}:
|
-
- $loadpercent%
+ |
+ $loadpercent $lt{'perc'}
|
- $lt{'userload'}:
+ |
+ $lt{'userload'}:
|
-
- $userloadpercent%
+ |
+ $userloadpercent $lt{'perc'}
|
|