version 1.462, 2006/10/10 21:57:31
|
version 1.465, 2006/10/13 22:03:26
|
Line 2596 sub submlink {
|
Line 2596 sub submlink {
|
my ($text,$uname,$udom,$symb,$target)=@_; |
my ($text,$uname,$udom,$symb,$target)=@_; |
if (!($uname && $udom)) { |
if (!($uname && $udom)) { |
(my $cursymb, my $courseid,$udom,$uname)= |
(my $cursymb, my $courseid,$udom,$uname)= |
&Apache::lonxml::whichuser($symb); |
&Apache::lonnet::whichuser($symb); |
if (!$symb) { $symb=$cursymb; } |
if (!$symb) { $symb=$cursymb; } |
} |
} |
if (!$symb) { $symb=&Apache::lonnet::symbread(); } |
if (!$symb) { $symb=&Apache::lonnet::symbread(); } |
Line 2642 sub pprmlink {
|
Line 2642 sub pprmlink {
|
my ($text,$uname,$udom,$symb,$target)=@_; |
my ($text,$uname,$udom,$symb,$target)=@_; |
if (!($uname && $udom)) { |
if (!($uname && $udom)) { |
(my $cursymb, my $courseid,$udom,$uname)= |
(my $cursymb, my $courseid,$udom,$uname)= |
&Apache::lonxml::whichuser($symb); |
&Apache::lonnet::whichuser($symb); |
if (!$symb) { $symb=$cursymb; } |
if (!$symb) { $symb=$cursymb; } |
} |
} |
if (!$symb) { $symb=&Apache::lonnet::symbread(); } |
if (!$symb) { $symb=&Apache::lonnet::symbread(); } |
Line 3388 table.LC_whatsnew tr.LC_empty_row td {
|
Line 3388 table.LC_whatsnew tr.LC_empty_row td {
|
text-align: center; |
text-align: center; |
padding: 8px; |
padding: 8px; |
} |
} |
|
table.LC_whatsnew tr.LC_empty_row td { |
|
padding: 4ex |
|
} |
|
|
|
|
table.LC_whatsnew { |
table.LC_whatsnew { |
} |
} |
Line 3728 Inputs: $title - optional title for the
|
Line 3732 Inputs: $title - optional title for the
|
bgcolor -> override the default page bgcolor |
bgcolor -> override the default page bgcolor |
no_auto_mt_title |
no_auto_mt_title |
-> prevent &mt()ing the title arg |
-> prevent &mt()ing the title arg |
|
|
=back |
=back |
|
|
=cut |
=cut |
Line 4676 sub get_env_multiple {
|
Line 4681 sub get_env_multiple {
|
|
|
=pod |
=pod |
|
|
=back |
=back |
|
|
=head1 CSV Upload/Handling functions |
=head1 CSV Upload/Handling functions |
|
|
Line 6004 sub escape_url {
|
Line 6009 sub escape_url {
|
|
|
# -------------------------------------------------------- Initliaze user login |
# -------------------------------------------------------- Initliaze user login |
sub init_user_environment { |
sub init_user_environment { |
my ($r, $username, $domain, $authhost, $form, $extra_env) = @_; |
my ($r, $username, $domain, $authhost, $form, $args) = @_; |
my $lonids=$Apache::lonnet::perlvar{'lonIDsDir'}; |
my $lonids=$Apache::lonnet::perlvar{'lonIDsDir'}; |
|
|
my $public=($username eq 'public' && $domain eq 'public'); |
my $public=($username eq 'public' && $domain eq 'public'); |
Line 6032 sub init_user_environment {
|
Line 6037 sub init_user_environment {
|
} |
} |
if (!$cookie) { $cookie="publicuser_$oldest"; } |
if (!$cookie) { $cookie="publicuser_$oldest"; } |
} else { |
} else { |
opendir(DIR,$lonids); |
# if this isn't a robot, kill any existing non-robot sessions |
while ($filename=readdir(DIR)) { |
if (!$args->{'robot'}) { |
if ($filename=~/^$username\_\d+\_$domain\_$authhost\.id$/) { |
opendir(DIR,$lonids); |
unlink($lonids.'/'.$filename); |
while ($filename=readdir(DIR)) { |
|
if ($filename=~/^$username\_\d+\_$domain\_$authhost\.id$/) { |
|
unlink($lonids.'/'.$filename); |
|
} |
} |
} |
|
closedir(DIR); |
} |
} |
closedir(DIR); |
|
|
|
# Give them a new cookie |
# Give them a new cookie |
|
my $id = ($args->{'robot'} ? 'robot'.$args->{'robot'} |
$cookie="$username\_$now\_$domain\_$authhost"; |
: $now); |
|
$cookie="$username\_$id\_$domain\_$authhost"; |
|
|
# Initialize roles |
# Initialize roles |
|
|
Line 6136 sub init_user_environment {
|
Line 6144 sub init_user_environment {
|
&_add_to_env(\%disk_env,\%initial_env); |
&_add_to_env(\%disk_env,\%initial_env); |
&_add_to_env(\%disk_env,\%userenv,'environment.'); |
&_add_to_env(\%disk_env,\%userenv,'environment.'); |
&_add_to_env(\%disk_env,$userroles); |
&_add_to_env(\%disk_env,$userroles); |
&_add_to_env(\%disk_env,$extra_env); |
if (ref($args->{'extra_env'})) { |
|
&_add_to_env(\%disk_env,$args->{'extra_env'}); |
|
} |
untie(%disk_env); |
untie(%disk_env); |
} else { |
} else { |
&Apache::lonnet::logthis("<font color=\"blue\">WARNING: ". |
&Apache::lonnet::logthis("<font color=\"blue\">WARNING: ". |