--- loncom/cgi/loncgi.pm 2003/10/09 22:04:37 1.1 +++ loncom/cgi/loncgi.pm 2005/05/25 22:31:51 1.5 @@ -1,7 +1,7 @@ # # LON-CAPA helpers for cgi-bin scripts # -# $Id: loncgi.pm,v 1.1 2003/10/09 22:04:37 matthew Exp $ +# $Id: loncgi.pm,v 1.5 2005/05/25 22:31:51 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -52,6 +52,7 @@ package LONCAPA::loncgi; use strict; use warnings FATAL=>'all'; no warnings 'uninitialized'; + use CGI(); use CGI::Cookie(); use Fcntl qw(:flock); @@ -75,7 +76,7 @@ BEGIN { Inputs: none Returns: 1 if the user has a LON-CAPA cookie 0 if not. -Loads the users environment into the %ENV hash if the cookie is correct. +Loads the users environment into the %env hash if the cookie is correct. =cut @@ -128,7 +129,7 @@ sub check_cookie { =item transfer_profile_to_env -Load the users environment into the %ENV hash. +Load the users environment into the %env hash. Inputs: $handle, the name of the users LON-CAPA cookie. @@ -150,9 +151,9 @@ sub transfer_profile_to_env { foreach my $envrow (@profile) { chomp($envrow); my ($envname,$envvalue)=split(/=/,$envrow); - $ENV{$envname} = $envvalue; + $Apache::lonnet::env{$envname} = $envvalue; } - $ENV{'user.environment'} = "$lonidsdir/$handle.id"; + $Apache::lonnet::env{'user.environment'} = "$lonidsdir/$handle.id"; return undef; }