--- loncom/auth/lonlogin.pm 2009/08/12 19:52:15 1.106.4.3 +++ 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.3 2009/08/12 19:52:15 raeburn Exp $ +# $Id: lonlogin.pm,v 1.128 2009/10/21 12:29:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -81,11 +81,15 @@ sub handler { &Apache::loncommon::start_page('Already logged in'); my $end_page = &Apache::loncommon::end_page(); + my $dest = '/adm/roles'; + if ($env{'form.firsturl'} ne '') { + $dest = $env{'form.firsturl'}; + } $r->print( $start_page .'
'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].', - '','','','').'
' + '','','','').'' .'' .$end_page ); @@ -102,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'}; @@ -124,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'); @@ -214,461 +220,288 @@ 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(< '; +} +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'}
|
|