--- loncom/auth/lonlogin.pm 2008/03/08 02:53:25 1.102 +++ loncom/auth/lonlogin.pm 2009/08/12 19:44:18 1.106.4.2 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.102 2008/03/08 02:53:25 raeburn Exp $ +# $Id: lonlogin.pm,v 1.106.4.2 2009/08/12 19:44:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -83,8 +83,8 @@ sub handler { &Apache::loncommon::end_page(); $r->print( $start_page - .'

'.&mt('You are already logged in').'

' - .'

'.&mt('Please either [_1]continue the current session[_2] or [_3]logout[_4].', + .'

'.&mt('You are already logged in!').'

' + .'

'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].', '','','','').'

' .'

'.&mt('Login problems?').'

' .$end_page @@ -201,7 +201,7 @@ sub handler { $hostname. '/adm/login?domain='.$authdomain.'">'. $hostname.''. - ' (preferred)'.$/; + ' '.&mt('(preferred)').''.$/; $last=$hostname; } $spares.= '
'; @@ -221,16 +221,20 @@ sub handler { $hostname.''; $last=$hostname; } - $r->print(< -The LearningOnline Network with CAPA - - -

This LON-CAPA server is temporarily not available for login

-

Please attempt to login to one of the following servers:

$spares - - -ENDTROUBLE + $r->print( + '' + .'' + .&mt('The LearningOnline Network with CAPA') + .'' + .'' + .'

'.&mt('The LearningOnline Network with CAPA').'

' + .'' + .'

'.&mt('This LON-CAPA server is temporarily not available for login.').'

' + .'

'.&mt('Please attempt to login to one of the following servers:').'

' + .$spares + .'' + .'' + ); return OK; } @@ -262,6 +266,14 @@ ENDTROUBLE if ($login eq '') { $login = $iconpath.'/'.&mt('userauthentication.gif'); } + my $showbanner = 1; + my $showmainlogo = 1; + if (defined(&Apache::loncommon::designparm('login.showlogo_img',$domain))) { + $showbanner = &Apache::loncommon::designparm('login.showlogo_img',$domain); + } + if (defined(&Apache::loncommon::designparm('login.showlogo_logo',$domain))) { + $showmainlogo = &Apache::loncommon::designparm('login.showlogo_logo',$domain); + } my $showadminmail=&Apache::loncommon::designparm('login.adminmail',$domain); my $showcoursecat = &Apache::loncommon::designparm('login.coursecatalog',$domain); @@ -271,7 +283,8 @@ ENDTROUBLE my $now=time; my $js = (< + ENDSCRIPT @@ -342,8 +356,7 @@ my %lt=&Apache::lonlocal::texthash( 'un' => 'Username', 'pw' => 'Password', 'dom' => 'Domain', - 'perc' => 'percent', - 'load' => 'Load', + 'load' => 'Server Load', 'userload' => 'User Load', 'about' => 'About LON-CAPA', 'access' => 'Accessibility Options', @@ -375,7 +388,7 @@ my %lt=&Apache::lonlocal::texthash( if ($fullgraph) { $r->print( - ''); + '
'); } $r->print(<print(<print(< - + @@ -455,9 +477,15 @@ ENDSERVERFORM '; @@ -503,13 +531,18 @@ ENDNOOPT $logintitle = ''; } + my $noscript_warning=''; $r->print(< - + + -
The Learning Online Network with CAPA +HEADER + if ($showbanner) { + $r->print(< +ENDBANNER + } + $r->print(<
+ENDSTART + if ($showmainlogo) { + $r->print(< +ENDLOGO + } + $r->print(< @@ -469,12 +497,12 @@ ENDSERVERFORM ENDTOP -} else { - $r->print('

The LearningOnline Network with CAPA

' - .'

'.&mt('Text-based Interface Login').'

' - .$announcements); -} - $r->print('
'); + } else { + $r->print('

The LearningOnline Network with CAPA

' + .'

'.&mt('Text-based Interface Login').'

' + .$announcements); + } + $r->print(''); unless ($fullgraph) { $r->print(<$lt{'options_headline'} @@ -486,8 +514,8 @@ ENDTOP
$lt{'remember'}
ENDACCESSOPTIONS -} else { - $r->print(<print(< @@ -495,7 +523,7 @@ ENDACCESSOPTIONS ENDNOOPT -} + } my $logintitle; if ($loginheader eq 'text') { $logintitle = '
   '.$lt{'log'}.''.
                       &mt('User Authentication').'' + .'
+
$logintitle + $noscript_warning @@ -562,12 +595,12 @@ ENDLOGIN

   :


- +
- @@ -575,24 +608,24 @@ ENDLOGIN - - - - -
   $lt{'dom'}:  +  $domain
   $lt{'serv'}:  +  $lonhost ($role)
-    $lt{'load'}:  + +    $lt{'load'}:  -  $loadpercent $lt{'perc'} + +  $loadpercent%
-    $lt{'userload'}:  + +    $lt{'userload'}:  -  $userloadpercent $lt{'perc'} + +  $userloadpercent%
@@ -628,8 +661,10 @@ $domainlogo
$helpdeskscript @@ -657,6 +692,7 @@ sub contactdisplay { my $thisurl = &escape('/adm/login'); $$helpdeskscript = <<"ENDSCRIPT"; ENDSCRIPT }