--- loncom/publisher/lonpublisher.pm 2010/06/02 19:09:42 1.267 +++ loncom/publisher/lonpublisher.pm 2011/10/25 14:28:17 1.272 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.267 2010/06/02 19:09:42 www Exp $ +# $Id: lonpublisher.pm,v 1.272 2011/10/25 14:28:17 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -266,9 +266,9 @@ sub metaread { my ($logfile,$fn,$prefix)=@_; unless (-e $fn) { print($logfile 'No file '.$fn."\n"); - return '
' + .&mt('No file: [_1]',&Apache::loncfile::display($fn)) + .'
'; } print($logfile 'Processing '.$fn."\n"); my $metastring; @@ -277,9 +277,9 @@ sub metaread { $metastring=join('',<$metafh>); } &metaeval($metastring,$prefix); - return '' + .&mt('Processed file: [_1]',&Apache::loncfile::display($fn)) + .'
'; } ######################################### @@ -1080,16 +1080,16 @@ sub publish { # ------------------------------------------------ Check out directory hierachy my $thisdisfn=$source; - $thisdisfn=~s/^\/home\/\Q$cuname\E\///; - my @urlparts=split(/\//,$thisdisfn); + $thisdisfn=~s/^\Q$docroot\E\/priv\/\Q$cudom\E\/\Q$cuname\E\///; + my @urlparts=('.',split(/\//,$thisdisfn)); $#urlparts--; - my $currentpath='/home/'.$cuname.'/'; + my $currentpath=$docroot.'/priv/'.$cudom.'/'.$cuname.'/'; my $prefix='../'x($#urlparts); - foreach (@urlparts) { - $currentpath.=$_.'/'; + foreach my $subdir (@urlparts) { + $currentpath.=$subdir.'/'; $scrout.=&metaread($logfile,$currentpath.'default.meta',$prefix); $prefix=~s|^\.\./||; } @@ -1223,14 +1223,12 @@ sub publish { my $intr_scrout.='