--- loncom/publisher/lonpublisher.pm 2006/10/02 19:57:35 1.211.2.2 +++ loncom/publisher/lonpublisher.pm 2006/09/13 21:43:26 1.212 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.211.2.2 2006/10/02 19:57:35 albertel Exp $ +# $Id: lonpublisher.pm,v 1.212 2006/09/13 21:43:26 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -856,7 +856,7 @@ sub store_metadata { &Apache::lonnet::logthis($status); return ($error,undef); } - return (undef,'success'); + return (undef,$status); } @@ -1470,7 +1470,6 @@ sub phasetwo { $metadatafields{'modifyinguser'}=$env{'user.name'}.':'. $env{'user.domain'}; $metadatafields{'authorspace'}=$cuname.':'.$cudom; - $metadatafields{'domain'}=$cudom; my $allkeywords=$env{'form.addkey'}; if (exists($env{'form.keywords'})) { @@ -1821,10 +1820,17 @@ sub publishdirectory { # previously published, modified now $publishthis=1; } + my $meta_cmtime = (stat($fn.'/'.$filename.'.meta'))[9]; + my $meta_rmtime = (stat($resdir.'/'.$filename.'.meta'))[9]; + if ( $meta_rmtime<$meta_cmtime ) { + &Apache::lonnet::logthis("meta change!"); + $publishthis=1; + } } else { # never published $publishthis=1; } + if ($publishthis) { &batchpublish($r,$fn.'/'.$filename,$resdir.'/'.$filename); } else {