[LON-CAPA-cvs] cvs: modules /gci lonlogin.pm
gci
gci@source.lon-capa.org
Mon, 11 Jan 2010 02:31:32 -0000
gci Mon Jan 11 02:31:32 2010 EDT
Modified files:
/modules/gci lonlogin.pm
Log:
- Customization for GCI for deep-linking.
- Calls to log-n page when already logged in.
- If query string contains role arg append appropriate args to link to /adm/roles.
- If query string contains symb arg append as destinationurl arg in link to /adm/roles.
- If symb form element is /adm/statistics do not set symb to /adm/gci_info
Index: modules/gci/lonlogin.pm
diff -u modules/gci/lonlogin.pm:1.8 modules/gci/lonlogin.pm:1.9
--- modules/gci/lonlogin.pm:1.8 Sat Jan 9 00:57:14 2010
+++ modules/gci/lonlogin.pm Mon Jan 11 02:31:32 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Login Screen
#
-# $Id: lonlogin.pm,v 1.8 2010/01/09 00:57:14 gci Exp $
+# $Id: lonlogin.pm,v 1.9 2010/01/11 02:31:32 gci Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -38,6 +38,7 @@
use Apache::migrateuser();
use lib '/home/httpd/lib/perl/';
use LONCAPA;
+use HTML::Entities();
sub handler {
my $r = shift;
@@ -82,6 +83,13 @@
my $end_page =
&Apache::loncommon::end_page();
my $dest = '/adm/roles';
+ if ($env{'form.role'}) {
+ $dest .= '?selectrole=1&'.$env{'form.role'}.'=1';
+ }
+ if ($env{'form.symb'}) {
+ $dest .= ($dest =~ /\?/) ? '&' : '?';
+ $dest .= 'destinationurl='.&HTML::Entities::encode($env{'form.symb'},'"&<>');
+ }
if ($env{'form.firsturl'} ne '') {
$dest = $env{'form.firsturl'};
}
@@ -200,7 +208,9 @@
$tokenextras = '&role='.&escape($env{'form.role'});
}
if ($domain eq 'gci') {
- $env{'form.symb'} = '/adm/gci_info';
+ unless ($env{'form.symb'} eq '/adm/statistics') {
+ $env{'form.symb'} = '/adm/gci_info';
+ }
}
if ($env{'form.symb'}) {
if (!$tokenextras) {