--- loncom/publisher/lonpublisher.pm 2011/10/22 15:16:20 1.268 +++ loncom/publisher/lonpublisher.pm 2011/10/22 21:25:37 1.269 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.268 2011/10/22 15:16:20 www Exp $ +# $Id: lonpublisher.pm,v 1.269 2011/10/22 21:25:37 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -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|^\.\./||; } @@ -2246,7 +2246,7 @@ ENDDIFF } unless ($errorcount) { my ($outstring,$error)= - &publish($fn,$thistarget,$thisembstyle); + &publish($docroot.$fn,$thistarget,$thisembstyle); $r->print($outstring); } else { $r->print('

'.