version 1.2, 2003/09/22 15:39:53
|
version 1.6, 2006/12/06 22:22:39
|
Line 34 use Apache::loncommon;
|
Line 34 use Apache::loncommon;
|
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncacc; |
use Apache::loncacc; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use LONCAPA(); |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 42 sub handler {
|
Line 43 sub handler {
|
return OK if $r->header_only; |
return OK if $r->header_only; |
|
|
# ------------------------------------------------------------ Print the screen |
# ------------------------------------------------------------ Print the screen |
$r->print(<<ENDDOCUMENT); |
|
<html> |
|
<head> |
|
<title>The LearningOnline Network with CAPA</title> |
|
</head> |
|
ENDDOCUMENT |
|
# Figure out who the user is and what they wanted to access |
# Figure out who the user is and what they wanted to access |
|
|
my ($ownername,$ownerdomain)= |
my ($ownername,$ownerdomain)= |
&Apache::loncacc::constructaccess($ENV{'request.editurl'},$r->dir_config('lonDefDomain')); |
&Apache::loncacc::constructaccess($env{'request.editurl'},$r->dir_config('lonDefDomain')); |
# print header |
# print header |
$r->print(&Apache::loncommon::bodytag |
$r->print(&Apache::loncommon::start_page("Failed Access to Construction Space", |
("Failed Access to Construction Space",'','','',$ownerdomain)); |
undef, |
|
{'domain' => $ownerdomain,})); |
# figure out what went wrong |
# figure out what went wrong |
|
|
if ($ownerdomain) { |
if ($ownerdomain) { |
Line 71 ENDDOCUMENT
|
Line 67 ENDDOCUMENT
|
$r->print( |
$r->print( |
"<h1>". |
"<h1>". |
&mt("You do not have authoring privileges for this resource")."</h1>"); |
&mt("You do not have authoring privileges for this resource")."</h1>"); |
my ($realownername)=($ENV{'request.editurl'}=~/\/(?:\~|priv\/|home\/)(\w+)/); |
my ($realownername)= |
|
($env{'request.editurl'}=~m{/(?:~|priv/|home/)($LONCAPA::username_re)}); |
my $realownerhome= |
my $realownerhome= |
&Apache::lonnet::homeserver( |
&Apache::lonnet::homeserver($realownername, |
$realownername,$r->dir_config('lonDefDomain')); |
$r->dir_config('lonDefDomain')); |
unless ($realownerhome eq 'no_host') { |
unless ($realownerhome eq 'no_host') { |
$r->print("<p>".&mt('Contact')." ". |
$r->print("<p>".&mt('Contact')." ". |
&Apache::loncommon::aboutmewrapper( |
&Apache::loncommon::aboutmewrapper( |
&Apache::loncommon::plainname($realownername, |
&Apache::loncommon::plainname($realownername, |
$r->dir_config('lonDefDomain')).'('. |
$r->dir_config('lonDefDomain')).' ('. |
$realownername.&mt(' at '). |
$realownername.&mt(' at '). |
$r->dir_config('lonDefDomain').')', |
$r->dir_config('lonDefDomain').')', |
$realownername,$r->dir_config('lonDefDomain')). |
$realownername,$r->dir_config('lonDefDomain')). |
' for access.'); |
' for access.</p>'); |
} |
} |
} |
} |
|
|
$r->print('</body></html>'); |
$r->print(&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} |
} |
|
|