--- loncom/auth/lonlogin.pm 2010/03/10 02:49:49 1.106.4.7
+++ 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.7 2010/03/10 02:49:49 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,27 +106,21 @@ 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 $redirect = &check_loginvia($domain,$lonhost);
- if ($redirect) {
- $r->print($redirect);
- return OK;
+ 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;
+ }
}
}
@@ -226,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'}
|
|