--- loncom/publisher/lonunauthorized.pm 2008/08/11 10:18:31 1.8 +++ loncom/publisher/lonunauthorized.pm 2011/06/07 18:05:08 1.10 @@ -1,7 +1,7 @@ # The LearningOnline Network # Unauthorized to access construction space # -# $Id: lonunauthorized.pm,v 1.8 2008/08/11 10:18:31 bisitz Exp $ +# $Id: lonunauthorized.pm,v 1.10 2011/06/07 18:05:08 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -54,8 +54,11 @@ sub handler { # figure out what went wrong if ($ownerdomain) { - $r->print('

'.&mt('Choose another server').'

' + $r->print('

' .&mt('The construction space for this resource is located on another server.') + .'

' + .'

' + .&mt('Choose another server.') .'

'); my $ownerhome=&Apache::lonnet::homeserver($ownername,$ownerdomain); unless ($ownerhome eq 'no_host') { @@ -64,10 +67,14 @@ sub handler { ,''.&Apache::lonnet::hostname($ownerhome).'') .'

'); } + } elsif (!$env{'request.editurl'}) { + $r->print('

' + .&mt('There may be a problem with the filename, e.g., you may be attempting to edit a versioned file (files in construction may not include a version number in front of the extension).') + .'

'); } else { - $r->print('

' + $r->print('

' .&mt('You do not have authoring privileges for this resource') - .'

'); + .'

'); my ($realownername)= ($env{'request.editurl'}=~m{/(?:~|priv/|home/)($LONCAPA::username_re)}); my $realownerhome= @@ -75,7 +82,7 @@ sub handler { $r->dir_config('lonDefDomain')); unless ($realownerhome eq 'no_host') { my $plainname=&Apache::loncommon::plainname($realownername,$r->dir_config('lonDefDomain')); - my $user=&mt('[_1] at [_2]',$realownername,$r->dir_config('lonDefDomain')); + my $user=$realownername.':'.$r->dir_config('lonDefDomain'); my $userlink=&Apache::loncommon::aboutmewrapper( $plainname.' ('.$user.')' ,$realownername