--- loncom/publisher/lonpublisher.pm 2009/05/14 11:13:49 1.258 +++ loncom/publisher/lonpublisher.pm 2009/08/13 05:35:33 1.258.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.258 2009/05/14 11:13:49 bisitz Exp $ +# $Id: lonpublisher.pm,v 1.258.2.1 2009/08/13 05:35:33 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1641,7 +1641,8 @@ sub phasetwo { my $srcf=$2; my $srct=$3; my $srcd=$1; - unless ($srcd=~/^\/home\/httpd\/html\/res/) { + my $docroot = $Apache::lonnet::perlvar{'lonDocRoot'}; + unless ($srcd=~/^\Q$docroot\E\/res/) { print $logfile "\nPANIC: Target dir is ".$srcd; $r->print( "".&mt('Invalid target directory, FAIL').""); @@ -1769,14 +1770,15 @@ sub phasetwo { my $thissrcdir=$thissrc; $thissrcdir=~s/\/[^\/]+$/\//; - - $r->print( - '
'.
+ unless ($env{'request.role'} =~ /^aa/) {
+ $r->print(
+ '
'.
+ $&mt('View Published Version').'');
+ }
+ $r->print(''.
- '