--- loncom/auth/lonlogin.pm 2010/05/21 15:54:34 1.138 +++ loncom/auth/lonlogin.pm 2010/09/02 09:24:42 1.145 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.138 2010/05/21 15:54:34 bisitz Exp $ +# $Id: lonlogin.pm,v 1.145 2010/09/02 09:24:42 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -69,6 +69,7 @@ sub handler { return OK; } + $env{'form.firsturl'} =~ s/(`)/'/g; # -------------------------------- Prevent users from attempting to login twice my $handle = &Apache::lonnet::check_for_valid_session($r); @@ -130,6 +131,7 @@ sub handler { } my $role = $r->dir_config('lonRole'); my $loadlim = $r->dir_config('lonLoadLim'); + my $uloadlim= $r->dir_config('lonUserLoadLim'); my $servadm = $r->dir_config('lonAdmEMail'); my $tabdir = $r->dir_config('lonTabDir'); my $include = $r->dir_config('lonIncludes'); @@ -150,17 +152,12 @@ sub handler { } $loadavg =~ s/\s.*//g; my $loadpercent=sprintf("%.1f",100*$loadavg/$loadlim); + unless ($loadlim) { $loadpercent='---'; } my $userloadpercent=&Apache::lonnet::userload(); + unless ($uloadlim) { $userloadpercent='---'; } -# ------------------------------------------------------- Do the load balancing - my $otherserver= &Apache::lonnet::absolute_url($host_name); my $firsturl= ($env{'request.firsturl'}?$env{'request.firsturl'}:$env{'form.firsturl'}); -# ---------------------------------------------------------- Are we overloaded? - if ((($userloadpercent>100.0)||($loadpercent>100.0))) { - my $unloaded=Apache::lonnet::spareserver($loadpercent,$userloadpercent); - if ($unloaded) { $otherserver=$unloaded; } - } # ----------------------------------------------------------- Get announcements my $announcements=&Apache::lonnet::getannounce(); @@ -269,7 +266,7 @@ my $loginbox_header_bgcol=&Apache::lonco my $loginbox_header_textcol=&Apache::loncommon::designparm('login.textcol',$domain); my $logo=&Apache::loncommon::designparm('login.logo',$domain); my $img=&Apache::loncommon::designparm('login.img',$domain); -my $domainlogo='
'.&Apache::loncommon::domainlogo($domain).'
'; +my $domainlogo=&Apache::loncommon::domainlogo($domain); my $showbanner = 1; my $showmainlogo = 1; if (defined(&Apache::loncommon::designparm('login.showlogo_img',$domain))) { @@ -313,6 +310,14 @@ this.document.client.elements.upass$now. this.document.server.submit(); return false; } + +function enableInput() { + this.document.client.elements.upass$now.removeAttribute("readOnly"); + this.document.client.elements.uname.removeAttribute("readOnly"); + this.document.client.elements.udom.removeAttribute("readOnly"); + return; +} + // ]]> @@ -325,7 +330,8 @@ my %add_entries = ( text => "$font", link => "$link", vlink => "$vlink", - alink => "$alink",); + alink => "$alink", + onload => 'javascript:enableInput();',); $r->print(&Apache::loncommon::start_page('The LearningOnline Network with CAPA Login',$js, { 'redirect' => [$expire,'/adm/roles'], @@ -375,7 +381,7 @@ $r->print( # $r->print(< +
@@ -414,11 +420,11 @@ my $loginform=(< :
-
+
:
-
+
:
-
+
LFORM @@ -455,12 +461,12 @@ ENDTOP } $r->print(<
ENDTOP $r->print(<
@@ -500,6 +506,11 @@ $r->print(<
+ +
+ $domainlogo +
+