--- modules/gci/lonlogin.pm 2009/10/03 01:41:27 1.4 +++ modules/gci/lonlogin.pm 2010/01/11 02:31:32 1.9 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.4 2009/10/03 01:41:27 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::lonlocal; use Apache::migrateuser(); use lib '/home/httpd/lib/perl/'; use LONCAPA; +use HTML::Entities(); sub handler { my $r = shift; @@ -82,6 +83,13 @@ sub handler { 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'}; } @@ -139,6 +147,8 @@ sub handler { my $version = $r->dir_config('lonVersion'); my $host_name = &Apache::lonnet::hostname($lonhost); if ($domain eq 'gcitest') { + $lonhost = 'gcitestl1'; + $host_name = 'gcitest.lite.msu.edu'; $sitename = 'GCI Testing Center'; $shortsitename = 'Testing Center'; $existing = 'Student with Testing Center account?'; @@ -197,6 +207,11 @@ sub handler { if ($env{'form.role'}) { $tokenextras = '&role='.&escape($env{'form.role'}); } + if ($domain eq 'gci') { + unless ($env{'form.symb'} eq '/adm/statistics') { + $env{'form.symb'} = '/adm/gci_info'; + } + } if ($env{'form.symb'}) { if (!$tokenextras) { $tokenextras = '&'; @@ -204,7 +219,7 @@ sub handler { $tokenextras .= '&symb='.&escape($env{'form.symb'}); } my $logtoken=Apache::lonnet::reply( - 'tmpput:'.$ukey.$lkey.'&'.$firsturl, + 'tmpput:'.$ukey.$lkey.'&'.$firsturl.$tokenextras, $lonhost); # ------------------- If we cannot talk to ourselves, we are in serious trouble @@ -480,7 +495,9 @@ END_OF_BLOCK1
- Note: + Note: If log-in fails, it may be because your browser is not accepting session cookies, or javascript is disabled. Learn more. |