--- loncom/publisher/lonpubdir.pm 2005/05/17 00:46:36 1.79 +++ loncom/publisher/lonpubdir.pm 2005/05/28 02:18:03 1.82 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Directory Lister # -# $Id: lonpubdir.pm,v 1.79 2005/05/17 00:46:36 www Exp $ +# $Id: lonpubdir.pm,v 1.82 2005/05/28 02:18:03 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -279,7 +279,7 @@ parent.lastknownpriv='/~$uname$thisdisfn if (activity == 'obsolete') { var pubform = document.pubresource pubform.filename.value = theform.filename.value - alert("You will be taken to the publication page.\\nCheck the 'Obsolete' checkbox at the bottom of the page, and click 'Finalize Publication'.") + pubform.makeobsolete.value=1; pubform.submit() } if (activity == 'print') { @@ -290,6 +290,10 @@ parent.lastknownpriv='/~$uname$thisdisfn document.retrieveres.filename.value = theform.filename.value document.retrieveres.submit() } + if (activity == 'cleanup') { + document.cleanup.filename.value = theform.filename.value + document.cleanup.submit() + } return } function changename(theform,activity) { @@ -396,6 +400,7 @@ sub resourceactions {
+
@@ -403,6 +408,9 @@ sub resourceactions {
+
+ +
END } @@ -507,6 +515,7 @@ sub putresource { my ($r, $udom, $uname, $filename, $thisdisfn, $resdir, $targetdir, $linkdir, $cmtime,$bombs,$numres) = @_; + &Apache::lonnet::devalidate_cache_new('meta',$targetdir.'/'.$filename); my $pubstatus = 'unpublished'; my $status=&mt('Unpublished'); my $bgcolor='#FFAA99'; @@ -568,6 +577,10 @@ sub putresource { $editlink=' ('.&mt('EditXML').')'; $editlink2='
('.&mt('Edit').')'; } + if ($filename=~/\.(problem|exam|quiz|assess|survey|form|library|xml|html|htm|xhtml|xhtm|sty)$/) { + $editlink.=''.&mt('Clean Up').''; + } if ($filename=~/\.(zip|tar|bz2|gz|tar.gz|tar.bz2|tgz)$/) { $editlink=' ('.&mt('Decompress').')'; @@ -613,6 +626,7 @@ sub create_pubselect { } $$pub_select .= ' '. +''. ''. '