--- loncom/publisher/lonpublisher.pm 2006/08/04 22:16:42 1.211 +++ loncom/publisher/lonpublisher.pm 2006/09/27 21:04:13 1.214 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.211 2006/08/04 22:16:42 albertel Exp $ +# $Id: lonpublisher.pm,v 1.214 2006/09/27 21:04:13 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -846,7 +846,7 @@ sub store_metadata { $status=&LONCAPA::lonmetadata::delete_metadata($dbh,undef, $metadata{'url'}); } else { - $status = &LONCAPA::lonmetadata::update_metadata($dbh,undef, + $status = &LONCAPA::lonmetadata::update_metadata($dbh,undef,undef, \%metadata); } if (defined($status) && $status ne '') { @@ -856,7 +856,7 @@ sub store_metadata { &Apache::lonnet::logthis($status); return ($error,undef); } - return (undef,$status); + return (undef,'success'); } @@ -1470,6 +1470,7 @@ 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'})) { @@ -1820,10 +1821,16 @@ 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 ) { + $publishthis=1; + } } else { # never published $publishthis=1; } + if ($publishthis) { &batchpublish($r,$fn.'/'.$filename,$resdir.'/'.$filename); } else {