--- loncom/auth/lonlogin.pm 2008/01/24 15:06:21 1.100 +++ 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.100 2008/01/24 15:06:21 bisitz Exp $ +# $Id: lonlogin.pm,v 1.106.4.2 2009/08/12 19:44:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -47,6 +47,9 @@ sub handler { $ENV{'REDIRECT_QUERY_STRING'}), ['interface','username','domain','firsturl','localpath','localres', 'token']); + if (!defined($env{'form.firsturl'})) { + &Apache::lonacc::get_posted_cgi($r,['firsturl']); + } # -- check if they are a migrating user if (defined($env{'form.token'})) { @@ -80,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 @@ -198,7 +201,7 @@ sub handler { $hostname. '/adm/login?domain='.$authdomain.'">'. $hostname.''. - ' (preferred)'.$/; + ' '.&mt('(preferred)').''.$/; $last=$hostname; } $spares.= '
'; @@ -218,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; } @@ -259,14 +266,25 @@ 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); my $loginheader =&Apache::loncommon::designparm('login.loginheader',$domain); + my $shownewuserlink = + &Apache::loncommon::designparm('login.newuser',$domain); my $now=time; my $js = (< + ENDSCRIPT @@ -337,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', @@ -349,6 +367,7 @@ my %lt=&Apache::lonlocal::texthash( 'servadm' => 'Server Administration', 'helpdesk' => 'Contact Helpdesk', 'forgotpw' => 'Forgot password?', + 'newuser' => 'New User?', 'options_headline' => 'Select Accessibility Options', 'sprs_img' => 'Suppress rendering of images', 'sprs_applet' => 'Suppress Java applets', @@ -369,7 +388,7 @@ my %lt=&Apache::lonlocal::texthash( if ($fullgraph) { $r->print( - ''); + '
'); } $r->print(<print(<print(< - + @@ -445,9 +477,15 @@ ENDSERVERFORM '; @@ -493,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(< @@ -459,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'} @@ -476,8 +514,8 @@ ENDTOP
$lt{'remember'}
ENDACCESSOPTIONS -} else { - $r->print(<print(< @@ -485,7 +523,7 @@ ENDACCESSOPTIONS ENDNOOPT -} + } my $logintitle; if ($loginheader eq 'text') { $logintitle = '
   '.$lt{'log'}.''.
                       &mt('User Authentication').'' + .'
+
$logintitle + $noscript_warning @@ -523,6 +566,8 @@ ENDNOOPT

   :

$loginhelp $forgotpw + $newuserlink +
@@ -550,12 +595,12 @@ ENDLOGIN
- +
- @@ -563,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%
@@ -616,8 +661,10 @@ $domainlogo $helpdeskscript @@ -645,6 +692,7 @@ sub contactdisplay { my $thisurl = &escape('/adm/login'); $$helpdeskscript = <<"ENDSCRIPT"; ENDSCRIPT } @@ -667,7 +716,7 @@ sub forgotpwdisplay { my (%lt) = @_; my $prompt_for_resetpw = 1; if ($prompt_for_resetpw) { - return '
   '.$lt{'forgotpw'}.'

'; + return '
   '.$lt{'forgotpw'}.'
'; } return; } @@ -691,5 +740,10 @@ sub coursecatalog_link { END } +sub newuser_link { + my ($linkname) = @_; + return '   '.$linkname.'
'; +} + 1; __END__