version 1.1, 2003/10/09 22:04:37
|
version 1.7, 2006/05/18 14:24:06
|
Line 52 package LONCAPA::loncgi;
|
Line 52 package LONCAPA::loncgi;
|
use strict; |
use strict; |
use warnings FATAL=>'all'; |
use warnings FATAL=>'all'; |
no warnings 'uninitialized'; |
no warnings 'uninitialized'; |
|
|
|
use lib '/home/httpd/lib/perl/'; |
use CGI(); |
use CGI(); |
use CGI::Cookie(); |
use CGI::Cookie(); |
use Fcntl qw(:flock); |
use Fcntl qw(:flock); |
|
use LONCAPA; |
use LONCAPA::Configuration(); |
use LONCAPA::Configuration(); |
|
|
my $lonidsdir; |
my $lonidsdir; |
Line 75 BEGIN {
|
Line 78 BEGIN {
|
Inputs: none |
Inputs: none |
|
|
Returns: 1 if the user has a LON-CAPA cookie 0 if not. |
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 |
=cut |
|
|
Line 128 sub check_cookie {
|
Line 131 sub check_cookie {
|
|
|
=item transfer_profile_to_env |
=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. |
Inputs: $handle, the name of the users LON-CAPA cookie. |
|
|
Line 149 sub transfer_profile_to_env {
|
Line 152 sub transfer_profile_to_env {
|
} |
} |
foreach my $envrow (@profile) { |
foreach my $envrow (@profile) { |
chomp($envrow); |
chomp($envrow); |
my ($envname,$envvalue)=split(/=/,$envrow); |
my ($envname,$envvalue)=split(/=/,$envrow,2); |
$ENV{$envname} = $envvalue; |
$envname = &unescape($envname); |
|
$envvalue = &unescape($envvalue); |
|
$Apache::lonnet::env{$envname} = $envvalue; |
} |
} |
$ENV{'user.environment'} = "$lonidsdir/$handle.id"; |
$Apache::lonnet::env{'user.environment'} = "$lonidsdir/$handle.id"; |
return undef; |
return undef; |
} |
} |
|
|
############################################# |
############################################# |
############################################# |
############################################# |
|
|
|
|
=pod |
=pod |
|
|
=back |
=back |