version 1.1, 2002/09/10 14:41:05
|
version 1.2, 2003/09/22 15:39:53
|
Line 33 use Apache::Constants qw(:common);
|
Line 33 use Apache::Constants qw(:common);
|
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncacc; |
use Apache::loncacc; |
|
use Apache::lonlocal; |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
return OK if $r->header_only; |
return OK if $r->header_only; |
|
|
Line 57 ENDDOCUMENT
|
Line 58 ENDDOCUMENT
|
# figure out what went wrong |
# figure out what went wrong |
|
|
if ($ownerdomain) { |
if ($ownerdomain) { |
$r->print('<h1>Choose another server</h1>'. |
$r->print('<h1>'.&mt('Choose another server').'</h1><p>'. |
"<p>The constuction space for this resource is located on another server.</p>" |
&mt('The constuction space for this resource is located on another server.'). |
); |
'</p>'); |
my $ownerhome=&Apache::lonnet::homeserver($ownername,$ownerdomain); |
my $ownerhome=&Apache::lonnet::homeserver($ownername,$ownerdomain); |
unless ($ownerhome eq 'no_host') { |
unless ($ownerhome eq 'no_host') { |
$r->print( |
$r->print( |
"<p>Please log into <tt>".$Apache::lonnet::hostname{$ownerhome}. |
"<p>".&mt('Please log into')." <tt>".$Apache::lonnet::hostname{$ownerhome}. |
"</tt> to edit.</p>"); |
"</tt> ".&mt('to edit.')."</p>"); |
} |
} |
} else { |
} else { |
$r->print( |
$r->print( |
"<h1>You do not have authoring privileges for this resource</h1>"); |
"<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'}=~/\/(?:\~|priv\/|home\/)(\w+)/); |
my $realownerhome= |
my $realownerhome= |
&Apache::lonnet::homeserver( |
&Apache::lonnet::homeserver( |
$realownername,$r->dir_config('lonDefDomain')); |
$realownername,$r->dir_config('lonDefDomain')); |
unless ($realownerhome eq 'no_host') { |
unless ($realownerhome eq 'no_host') { |
$r->print("<p>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.' 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.'); |