version 1.141, 2012/12/06 22:00:31
|
version 1.144, 2013/05/10 17:49:17
|
Line 275 sub sso_login {
|
Line 275 sub sso_login {
|
my ($r,$handle) = @_; |
my ($r,$handle) = @_; |
|
|
my $lonidsdir=$r->dir_config('lonIDsDir'); |
my $lonidsdir=$r->dir_config('lonIDsDir'); |
if (!($r->user |
if (($r->user eq '') || |
&& (!defined($env{'user.name'}) && !defined($env{'user.domain'})) |
(defined($env{'user.name'}) && (defined($env{'user.domain'})) |
&& ($handle eq ''))) { |
&& ($handle ne ''))) { |
# not an SSO case or already logged in |
# not an SSO case or already logged in |
return undef; |
return undef; |
} |
} |
Line 396 sub handler {
|
Line 396 sub handler {
|
} |
} |
|
|
my ($is_balancer,$otherserver); |
my ($is_balancer,$otherserver); |
|
|
if ($handle eq '') { |
if ($handle eq '') { |
$r->log_reason("Cookie $handle not valid", $r->filename); |
unless (($requrl eq '/adm/switchserver') && (!$r->is_initial_req())) { |
|
$r->log_reason("Cookie $handle not valid", $r->filename); |
|
} |
} elsif ($handle ne '') { |
} elsif ($handle ne '') { |
|
|
# ------------------------------------------------------ Initialize Environment |
# ------------------------------------------------------ Initialize Environment |
Line 627 sub handler {
|
Line 629 sub handler {
|
$env{'request.state'} = 'edit'; |
$env{'request.state'} = 'edit'; |
} |
} |
} |
} |
|
} |
|
} elsif ($requrl =~ m{^/+uploaded/\Q$cdom\E/\Q$cnum\E/portfolio/syllabus/.+\.html?$}) { |
|
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
|
if ($query) { |
|
&Apache::loncommon::get_unprocessed_cgi($query,['forceedit','editmode']); |
|
if (($env{'form.forceedit'}) || ($env{'form.editmode'})) { |
|
$env{'request.state'} = 'edit'; |
|
} |
|
} |
} |
} |
} |
} |
} |
} |