--- loncom/auth/lonauth.pm 2012/04/11 11:40:07 1.121 +++ loncom/auth/lonauth.pm 2012/08/27 02:02:20 1.123 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.121 2012/04/11 11:40:07 goltermann Exp $ +# $Id: lonauth.pm,v 1.123 2012/08/27 02:02:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -139,15 +139,19 @@ sub success { my %lt=&Apache::lonlocal::texthash( 'wel' => 'Welcome', 'pro' => 'Login problems?', - 'log' => 'loginproblems.html', ); + my $loginhelp = &loginhelpdisplay($domain); + if ($loginhelp) { + $loginhelp = '
'; + } + my $welcome = &mt('Welcome to the Learning[_1]Online[_2] Network with CAPA. Please wait while your session is being set up.','',''); $r->print(<'.&mt($message).'
' .''.&mt('Please [_1]log in again[_2].','','') .'
' - .'' + .$loginhelp .$end_page ); } @@ -543,6 +552,33 @@ sub noswitch { return $result; } +sub loginhelpdisplay { + my ($authdomain) = @_; + my $login_help = 1; + my $lang = &Apache::lonlocal::current_language(); + if ($login_help) { + my $dom = $authdomain; + if ($dom eq '') { + $dom = &Apache::lonnet::default_login_domain(); + } + my %domconfhash = &Apache::loncommon::get_domainconf($dom); + my $loginhelp_url; + if ($lang) { + $loginhelp_url = $domconfhash{$dom.'.login.helpurl_'.$lang}; + if ($loginhelp_url ne '') { + return $loginhelp_url; + } + } + $loginhelp_url = $domconfhash{$dom.'.login.helpurl_nolang'}; + if ($loginhelp_url ne '') { + return $loginhelp_url; + } else { + return '/adm/loginproblems.html'; + } + } + return; +} + 1; __END__