[LON-CAPA-cvs] cvs: modules /gci lonlogin.pm
gci
gci@source.lon-capa.org
Wed, 23 Sep 2009 13:14:19 -0000
gci Wed Sep 23 13:14:19 2009 EDT
Modified files:
/modules/gci lonlogin.pm
Log:
- Backport 1.115, 1.116, 1.117, 1.123, 1.124.
Index: modules/gci/lonlogin.pm
diff -u modules/gci/lonlogin.pm:1.1 modules/gci/lonlogin.pm:1.2
--- modules/gci/lonlogin.pm:1.1 Thu Sep 17 01:55:01 2009
+++ modules/gci/lonlogin.pm Wed Sep 23 13:14:19 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Login Screen
#
-# $Id: lonlogin.pm,v 1.1 2009/09/17 01:55:01 gci Exp $
+# $Id: lonlogin.pm,v 1.2 2009/09/23 13:14:19 gci Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -46,7 +46,7 @@
(join('&',$ENV{'QUERY_STRING'},$env{'request.querystring'},
$ENV{'REDIRECT_QUERY_STRING'}),
['interface','username','domain','firsturl','localpath','localres',
- 'token']);
+ 'token','role','symb']);
if (!defined($env{'form.firsturl'})) {
&Apache::lonacc::get_posted_cgi($r,['firsturl']);
}
@@ -84,7 +84,7 @@
$r->print(
$start_page
.'<h1>'.&mt('You are already logged in!').'</h1>'
- .'<p>'.&mt('Please either [_1]continue the current session[_2] or [_3]logout[_4].',
+ .'<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>'
.'<p><a href="/adm/loginproblems.html">'.&mt('Login problems?').'</a></p>'
.$end_page
@@ -179,6 +179,16 @@
if ($uextkey>2147483647) { $uextkey-=4294967296; }
# -------------------------------------------------------- Store away log token
+ my $tokenextras;
+ if ($env{'form.role'}) {
+ $tokenextras = '&role='.&escape($env{'form.role'});
+ }
+ if ($env{'form.symb'}) {
+ if (!$tokenextras) {
+ $tokenextras = '&';
+ }
+ $tokenextras .= '&symb='.&escape($env{'form.symb'});
+ }
my $logtoken=Apache::lonnet::reply(
'tmpput:'.$ukey.$lkey.'&'.$firsturl,
$lonhost);
@@ -281,7 +291,8 @@
my $now=time;
my $js = (<<ENDSCRIPT);
- <script language="JavaScript">
+ <script type="text/javascript" language="JavaScript">
+// <![CDATA[
function send(caller)
{
@@ -340,7 +351,7 @@
return false;
}
</script>
-
+// ]]>
ENDSCRIPT
# --------------------------------------------------- Print login screen header
@@ -464,7 +475,7 @@
</td>
<td width="10"> </td>
<td valign="top">
- <form name="client" method="post" onsubmit="return(send());">
+ <form name="client" method="post" action="" onsubmit="return(send());">
<table class="LC_loginbox_right">
<tr>
<td colspan="3" height="23" class="LC_loginbox_strip"> </td>
@@ -569,7 +580,7 @@
<h1>The Learning<i>Online</i> Network with CAPA</h1>
<h2>$lt{'tbli'}</h2>$announcements
<h3>$lt{'options_headline'}</h3>
-<form name="client" onsubmit="return(send())">
+<form name="client" action="" onsubmit="return(send())">
<label><input type="checkbox" name="imagesuppress" /> $lt{'sprs_img'}</label><br />
<label><input type="checkbox" name="appletsuppress" /> $lt{'sprs_applet'}</label><br />
<label><input type="checkbox" name="embedsuppress" /> $lt{'sprs_embed'}</label><br />
@@ -580,8 +591,8 @@
ENDACCESSOPTIONS
}
$r->print('
- <input type="hidden" name="lextkey" value="'.$lextkey.'">
- <input type="hidden" name="uextkey" value="'.$uextkey.'">
+ <input type="hidden" name="lextkey" value="'.$lextkey.'" />
+ <input type="hidden" name="uextkey" value="'.$uextkey.'" />
');
unless ($fullgraph) {
my $logintitle;
@@ -597,7 +608,7 @@
.'</font></div></noscript></td>';
$r->print(<<ENDTEXTUAL);
<hr />
- <table border=0 cellspacing=0 cellpadding=0>
+ <table border=0 cellspacing="0" cellpadding="0">
<tr>$logintitle</tr>
<tr>$noscript_warning</tr>
<tr>
@@ -676,6 +687,7 @@
my $thisurl = &escape('/adm/login');
$$helpdeskscript = <<"ENDSCRIPT";
<script type="text/javascript">
+// <![CDATA[
function helpdesk() {
var codedom = document.client.udom.value;
if (codedom == '') {
@@ -685,6 +697,7 @@
document.location.href = "/adm/helpdesk?"+querystr;
return;
}
+// ]]>
</script>
ENDSCRIPT
}