[LON-CAPA-cvs] cvs: loncom /auth lonlogin.pm
raeburn
raeburn@source.lon-capa.org
Fri, 11 Sep 2009 23:04:46 -0000
raeburn Fri Sep 11 23:04:46 2009 EDT
Modified files:
/loncom/auth lonlogin.pm
Log:
- If a firsturl was specified in the query string for the log-in page,
send the user there if the user already has a LON-CAPA session.
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.124 loncom/auth/lonlogin.pm:1.125
--- loncom/auth/lonlogin.pm:1.124 Wed Jul 22 21:51:03 2009
+++ loncom/auth/lonlogin.pm Fri Sep 11 23:04:45 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Login Screen
#
-# $Id: lonlogin.pm,v 1.124 2009/07/22 21:51:03 raeburn Exp $
+# $Id: lonlogin.pm,v 1.125 2009/09/11 23:04:45 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -81,11 +81,15 @@
&Apache::loncommon::start_page('Already logged in');
my $end_page =
&Apache::loncommon::end_page();
+ my $dest = '/adm/roles';
+ if ($env{'form.firsturl'} ne '') {
+ $dest = $env{'form.firsturl'};
+ }
$r->print(
$start_page
.'<h1>'.&mt('You are already logged in!').'</h1>'
.'<p>'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].',
- '<a href="/adm/roles">','</a>','<a href="/adm/logout">','</a>').'</p>'
+ '<a href="'.$dest.'">','</a>','<a href="/adm/logout">','</a>').'</p>'
.'<p><a href="/adm/loginproblems.html">'.&mt('Login problems?').'</a></p>'
.$end_page
);