--- 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='
@@ -500,6 +506,11 @@ $r->print(< |