version 1.7, 2007/03/02 23:18:19
|
version 1.8, 2008/08/11 10:18:31
|
Line 54 sub handler {
|
Line 54 sub handler {
|
# figure out what went wrong |
# figure out what went wrong |
|
|
if ($ownerdomain) { |
if ($ownerdomain) { |
$r->print('<h1>'.&mt('Choose another server').'</h1><p>'. |
$r->print('<h1>'.&mt('Choose another server').'</h1><p>' |
&mt('The constuction space for this resource is located on another server.'). |
.&mt('The construction space for this resource is located on another server.') |
'</p>'); |
.'</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>' |
"<p>".&mt('Please log into')." <tt>".&Apache::lonnet::hostname($ownerhome). |
.&mt('Please log into [_1] to edit.' |
"</tt> ".&mt('to edit.')."</p>"); |
,'<tt>'.&Apache::lonnet::hostname($ownerhome).'</tt>') |
|
.'</p>'); |
} |
} |
} else { |
} else { |
$r->print( |
$r->print('<h1>' |
"<h1>". |
.&mt('You do not have authoring privileges for this resource') |
&mt("You do not have authoring privileges for this resource")."</h1>"); |
.'</h1>'); |
my ($realownername)= |
my ($realownername)= |
($env{'request.editurl'}=~m{/(?:~|priv/|home/)($LONCAPA::username_re)}); |
($env{'request.editurl'}=~m{/(?:~|priv/|home/)($LONCAPA::username_re)}); |
my $realownerhome= |
my $realownerhome= |
&Apache::lonnet::homeserver($realownername, |
&Apache::lonnet::homeserver($realownername, |
$r->dir_config('lonDefDomain')); |
$r->dir_config('lonDefDomain')); |
unless ($realownerhome eq 'no_host') { |
unless ($realownerhome eq 'no_host') { |
$r->print("<p>".&mt('Contact')." ". |
my $plainname=&Apache::loncommon::plainname($realownername,$r->dir_config('lonDefDomain')); |
&Apache::loncommon::aboutmewrapper( |
my $user=&mt('[_1] at [_2]',$realownername,$r->dir_config('lonDefDomain')); |
&Apache::loncommon::plainname($realownername, |
my $userlink=&Apache::loncommon::aboutmewrapper( |
$r->dir_config('lonDefDomain')).' ('. |
$plainname.' ('.$user.')' |
$realownername.&mt(' at '). |
,$realownername |
$r->dir_config('lonDefDomain').')', |
,$r->dir_config('lonDefDomain')); |
$realownername,$r->dir_config('lonDefDomain')). |
$r->print('<p>' |
' for access.</p>'); |
.&mt('Contact [_1] for access.',$userlink) |
|
.'</p>'); |
} |
} |
} |
} |
|
|