--- loncom/auth/lonauth.pm 2016/02/17 19:15:40 1.139
+++ loncom/auth/lonauth.pm 2016/04/02 04:31:33 1.140
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonauth.pm,v 1.139 2016/02/17 19:15:40 raeburn Exp $
+# $Id: lonauth.pm,v 1.140 2016/04/02 04:31:33 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -29,7 +29,7 @@
package Apache::lonauth;
use strict;
-use LONCAPA;
+use LONCAPA qw(:DEFAULT :match);
use Apache::Constants qw(:common);
use CGI qw(:standard);
use DynaLoader; # for Crypt::DES version
@@ -122,9 +122,30 @@ sub success {
my $header = '';
my $brcrum = [{'href' => '',
'text' => 'Successful Login'},];
+ my $args = {'bread_crumbs' => $brcrum,};
+ unless ((defined($form->{role})) || (defined($form->{symb}))) {
+ my $update=$env{'user.update.time'};
+ if (!$update) {
+ $update = $env{'user.login.time'};
+ }
+ my %roles_in_env;
+ my $showcount = &Apache::lonroles::roles_from_env(\%roles_in_env,$update);
+ if ($showcount == 1) {
+ foreach my $rolecode (keys(%roles_in_env)) {
+ my ($cid) = ($rolecode =~ m{^\Quser.role.st./\E($match_domain/$match_courseid)(?:/|$)});
+ if ($cid) {
+ my %coursedescription =
+ &Apache::lonnet::coursedescription($cid,{'one_time' => '1'});
+ if ($coursedescription{'type'} eq 'Placement') {
+ $args->{'crstype'} = 'Placement';
+ }
+ last;
+ }
+ }
+ }
+ }
my $start_page=&Apache::loncommon::start_page('Successful Login',
- $header,
- {'bread_crumbs' => $brcrum,});
+ $header,$args);
my $end_page =&Apache::loncommon::end_page();
my $continuelink=''.&mt('Continue').'';