--- loncom/auth/lonlogin.pm 2005/04/28 01:19:20 1.64 +++ loncom/auth/lonlogin.pm 2005/11/23 20:58:31 1.70 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.64 2005/04/28 01:19:20 albertel Exp $ +# $Id: lonlogin.pm,v 1.70 2005/11/23 20:58:31 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -60,10 +60,15 @@ sub handler { my $handle=$lonid->value; $handle=~s/\W//g; my $lonidsdir=$r->dir_config('lonIDsDir'); - if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) { + if (-e "$lonidsdir/$handle.id") { +# Is there an existing token file? + if ($handle=~/^publicuser\_/) { +# For "public user" - remove it, we apparently really want to login + unlink("$lonidsdir/$handle.id"); + } elsif ($handle ne '') { # Indeed, a valid token is found - my $bodytag=&Apache::loncommon::bodytag('Already logged in'); - $r->print(<print(< Already logged in @@ -77,7 +82,8 @@ $bodytag ENDFAILED - return OK; + return OK; + } } } @@ -86,8 +92,12 @@ ENDFAILED &Apache::loncommon::get_unprocessed_cgi ($ENV{'QUERY_STRING'}.'&'.$env{'request.querystring'}, ['interface','username','domain','firsturl','localpath','localres']); - + # ---------------------------- Not possible to really login to domain "public" + if ($env{'form.domain'} eq 'public') { + $env{'form.domain'}=''; + $env{'form.username'}=''; + } # ----------------------------------------------------------- Process Interface $env{'form.interface'}=~s/\W//g; @@ -108,6 +118,10 @@ ENDFAILED my $iconpath= 'http://'.$ENV{'HTTP_HOST'}.':'.$port_to_use. $r->dir_config('lonIconsURL'); my $domain = $r->dir_config('lonDefDomain'); + my $testdomain=(split(/\./,$ENV{'HTTP_HOST'}))[0]; + foreach my $posdom (&Apache::lonnet::current_machine_domains()) { + if ($posdom eq $testdomain) { $domain=$testdomain; } + } if (($env{'form.domain'}) && ($Apache::lonnet::domaindescription{$env{'form.domain'}})) { $domain=$env{'form.domain'}; @@ -279,7 +293,8 @@ my %lt=&Apache::lonlocal::texthash( 'servadm' => 'Server Administration', 'sysadm' => 'System Administration', 'helpdesk' => 'Contact Helpdesk'); - +# -------------------------------------------------- Change password field name + my $now=time; # ---------------------------------------------------------- Serve rest of page $r->print(< - + + + @@ -410,11 +434,11 @@ ENDTOP unless ($fullgraph) { $r->print(<Select Accessibility Options - Suppress rendering of images
- Suppress Java applets
- Suppress rendering of embedded multimedia
- Increase font size
- Switch to black and white mode
+
+
+
+
+

If you have accessibility needs that are not addressed by this interface, please contact the system administrator at $sysadm.


@@ -443,7 +467,7 @@ ENDNOOPT    $lt{'pw'}: - +    $lt{'dom'}: