--- loncom/auth/lonauth.pm 2008/07/10 00:26:40 1.93 +++ loncom/auth/lonauth.pm 2009/07/03 10:22:00 1.99 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.93 2008/07/10 00:26:40 raeburn Exp $ +# $Id: lonauth.pm,v 1.99 2009/07/03 10:22:00 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -78,14 +78,16 @@ sub success { my $remoteinfo=&Apache::lonmenu::load_remote_msg($lowerurl); my $setflags=&Apache::lonmenu::setflags(); my $maincall=&Apache::lonmenu::maincall(); + my $brcrum = [{'href' => '', + 'text' => 'Successful Login'},]; my $start_page=&Apache::loncommon::start_page('Successful Login', - $startupremote, - {'no_inline_link' => 1,}); + $startupremote, + {'no_inline_link' => 1, + 'bread_crumbs' => $brcrum,}); my $end_page =&Apache::loncommon::end_page(); my $continuelink; - if (($env{'browser.interface'} eq 'textual') || - ($env{'environment.remote'} eq 'off')) { + if ($env{'environment.remote'} eq 'off') { $continuelink="".&mt('Continue').""; } # ------------------------------------------------- Output for successful login @@ -126,7 +128,7 @@ sub failed { $r->print( $start_page .'

'.&mt('Sorry ...').'

' - .'

'.&mt($message).'

' + .'

'.&mt($message).'

' .'

'.&mt('Please [_1]log in again[_2].' ,"{'uname'}&domain=$form->{'udom'}\">",'') .'

' @@ -172,7 +174,7 @@ sub handler { $r->print( $start_page .'

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

' - .'

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

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

' .'

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

' @@ -298,32 +300,15 @@ sub handler { &Apache::loncommon::build_recipient_list(undef,'helpdeskmail', $form{'udom'},$origmail); my ($contact_email) = split(',',$contacts); - my ($output,$checkfail) = - &Apache::createaccount::username_check($form{'uname'},$form{'udom'}, - $domdesc,undef,$lonhost, - $contact_email); + my $output = &Apache::createaccount::username_check($form{'uname'}, + $form{'udom'},$domdesc,'', + $lonhost,$contact_email,$contact_name); &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; &Apache::createaccount::print_header($r,$start_page); - my $msg = '

'.&mt('Account creation').'

'. - ''.&mt('Although your username and password were authenticated, you do not currently have a LON-CAPA account in this domain.').'
'; - if ($checkfail) { - $msg .= '

'.&mt('Account creation unavailable').'

'; - if ($checkfail eq 'username') { - $msg .= ''. - &mt('A LON-CAPA account may not be created with the username you use.').''; - } elsif ($checkfail eq 'authtoken') { - $msg .= ''.&mt('Error creating token.').''; - } - &Apache::lonnet::logthis("ERROR: failure type of '$checkfail' when performing username check to create account for authenticated user: $form{'uname'}, in domain $form{'udom'}"); - $msg .= '

'. - &mt('Please contact the [_1] ([_2]) for assistance.', - $contact_name,$contact_email); - } else { - $msg .= &mt('To create one, use the table below to provide information about yourself (if appropriate), then click the "Create LON-CAPA account" button.'); - } - $r->print($msg.$output); - $r->print(&Apache::loncommon::end_page()); + $r->print('

'.&mt('Account creation').'

'. + &mt('Although your username and password were authenticated, you do not currently have a LON-CAPA account at this institution.').'
'. + $output.&Apache::loncommon::end_page()); return OK; } else { &failed($r,'Although your username and password were authenticated, you do not currently have a LON-CAPA account in this domain, and you are not permitted to create one.',\%form);