[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm

raeburn raeburn at source.lon-capa.org
Thu Jun 3 09:59:44 EDT 2021


raeburn		Thu Jun  3 13:59:44 2021 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
  Log:
  - When publishing a directory include option to exclude currently unpublished
    resources (e.g., if only change being made is copyright/distribution or
    source availability for already published files).
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.297 loncom/publisher/lonpublisher.pm:1.298
--- loncom/publisher/lonpublisher.pm:1.297	Sun Jun 19 04:27:57 2016
+++ loncom/publisher/lonpublisher.pm	Thu Jun  3 13:59:44 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.297 2016/06/19 04:27:57 raeburn Exp $
+# $Id: lonpublisher.pm,v 1.298 2021/06/03 13:59:44 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2277,6 +2277,7 @@
 		  &checkbox('forcerepub','force republication of previously published files').
                   &checkbox('obsolete','make file(s) obsolete').
 		  &checkbox('forceoverride','force directory level metadata over existing').
+                  &checkbox('excludeunpub','exclude currently unpublished files').
                   &common_access('dist',&mt('apply common copyright/distribution'),
                                  ['default','domain','custom']).
                   &common_access('source',&mt('apply common source availability'),
@@ -2309,7 +2310,7 @@
 		}
 	    } elsif ((&Apache::loncommon::fileembstyle($extension) ne 'hdn') &&
 		     ($filename!~/^[\#\.]/) && ($filename!~/\~$/)) {
-# find out publication status and/or exiting metadata
+# find out publication status and/or existing metadata
 		my $publishthis=0;
 		if (-e $resdir.'/'.$filename) {
 		    my ($rdev,$rino,$rmode,$rnlink,
@@ -2327,7 +2328,9 @@
 		    }
 		} else {
 # never published
-		    $publishthis=1;
+		    unless ($env{'form.excludeunpub'}) {
+		        $publishthis=1;
+		    }
 		}
 		
 		if ($publishthis) {




More information about the LON-CAPA-cvs mailing list