--- loncom/auth/lonauth.pm 2002/05/06 21:55:25 1.30 +++ loncom/auth/lonauth.pm 2003/01/16 01:37:26 1.34 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.30 2002/05/06 21:55:25 matthew Exp $ +# $Id: lonauth.pm,v 1.34 2003/01/16 01:37:26 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -83,14 +83,16 @@ sub success { my $clientbrowser='unknown'; my $clientversion='0'; my $clientmathml=''; + my $clientunicode='0'; for ($i=0;$i<=$#browsertype;$i++) { - my ($bname,$match,$notmatch,$vreg,$minv)=split(/\:/,$browsertype[$i]); + my ($bname,$match,$notmatch,$vreg,$minv,$univ)=split(/\:/,$browsertype[$i]); if (($httpbrowser=~/$match/i) && ($httpbrowser!~/$notmatch/i)) { $clientbrowser=$bname; $httpbrowser=~/$vreg/i; $clientversion=$1; $clientmathml=($clientversion>=$minv); - } + $clientunicode=($clientversion>=$univ); + } } my $clientos='unknown'; if (($httpbrowser=~/linux/i) || @@ -103,18 +105,17 @@ sub success { if (($httpbrowser=~/mac/i) || ($httpbrowser=~/powerpc/i)) { $clientos='mac'; } if ($httpbrowser=~/win/i) { $clientos='win'; } + if ($httpbrowser=~/embed/i) { $clientos='pda'; } # ------------------------------------------------------------- Get environment - my $userenv=Apache::lonnet::reply("dump:$domain:$username:environment", - $authhost); - if (($userenv eq 'con_lost') || - ($userenv =~ /^error\:/)) { - $userenv=''; - } - $userenv=~s/\&/\nenvironment\./g; - if ($userenv ne '') { - $userenv='environment.'.$userenv; + my $userenv; + my %userenv=Apache::lonnet::dump('environment',$domain,$username); + my ($tmp) = keys(%userenv); + if ($tmp !~ /^(con_lost|error|no_such_host)/i) { + foreach my $key (keys(%userenv)) { + $userenv.="environment.$key=$userenv{$key}\n"; + } } # --------------------------------------------------------- Write first profile @@ -133,6 +134,7 @@ sub success { print $idf "browser.type=$clientbrowser\n"; print $idf "browser.version=$clientversion\n"; print $idf "browser.mathml=$clientmathml\n"; + print $idf "browser.unicode=$clientunicode\n"; print $idf "browser.os=$clientos\n"; print $idf "request.course.fn=\n"; print $idf "request.course.uri=\n"; @@ -162,7 +164,7 @@ sub success { $cookie="lonID=$cookie; path=/"; # -------------------------------------------------------- Menu script and info - my $windowinfo=&Apache::lonmenu::open(); + my $windowinfo=&Apache::lonmenu::open($clientos); # ------------------------------------------------------------- Info for Remote my $configmenu=&Apache::lonmenu::rawconfig($r); # ------------------------------------------------- Output for successful login @@ -215,6 +217,10 @@ function main() { $windowinfo

Welcome!

+Welcome to the LearningOnline Network with CAPA. +Please wait while your session +is being set up.

+Problems?