--- loncom/publisher/lonpubdir.pm 2005/05/19 03:22:04 1.80
+++ loncom/publisher/lonpubdir.pm 2005/07/14 18:27:35 1.87
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.80 2005/05/19 03:22:04 www Exp $
+# $Id: lonpubdir.pm,v 1.87 2005/07/14 18:27:35 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -111,7 +111,7 @@ sub handler {
'
- Actions for current directory |
- Upload a new document |
- Create a new directory or LON-CAPA document |
+ $lt{'acti'} |
+ $lt{'updc'} |
+ $lt{'crea'} |
@@ -345,23 +381,24 @@ sub dircontrols {
|
@@ -377,7 +414,7 @@ sub pubbuttons {
'');
}
@@ -404,6 +441,9 @@ sub resourceactions {
+
END
}
@@ -473,15 +513,14 @@ sub putdirectory {
$actionitem =
'';
@@ -489,9 +528,9 @@ sub putdirectory {
}
$r->print(' |
'.
' | '.
+ $Apache::lonnet::perlvar{'lonIconsURL'}.'/folder_closed.gif" alt="folder" />'.
''.$actionitem.' | '.
- ''.
+ ' | '.
$disfilename.' | '.
''.($kaputt?&Apache::lonhtmlcommon::authorbombs($resdir.'/'.$disfilename.'/'):'').$Apache::lonpublisher::metadatafields{'title'}.' '.
$Apache::lonpublisher::metadatafields{'subject'}.' '.
@@ -508,6 +547,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';
@@ -556,7 +596,7 @@ sub putresource {
}
}
$title.="\n".' '.
- ($$bombs{$targetdir.'/'.$filename}?'':'Edit Metadata').'';
+ ($$bombs{$targetdir.'/'.$filename}?'':'Edit Metadata').'';
$status.="\n".' '.&mt('Retrieve').'';
}
@@ -569,6 +609,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').')';
@@ -577,7 +621,7 @@ sub putresource {
&create_pubselect($r,\$pub_select,$udom,$uname,$thisdisfn,$filename,$resdir,$pubstatus,$publish_button,$numres);
$r->print(' |
'.
''.($filename=~/[\#\~]$/?' ':
- ' | ').
+ '').''.
''.$pub_select.' | '.
''.
''.
@@ -594,7 +638,7 @@ sub create_pubselect {
my ($r,$pub_select,$udom,$uname,$thisdisfn,$filename,$resdir,$pubstatus,$publish_button,$numres) = @_;
$$pub_select = '
';
+ &HTML::Entities::encode($uname.$thisdisfn.'/'.$filename,'<>&"').'" />';
$$numres ++;
}
|