--- loncom/publisher/lonpubdir.pm 2024/02/28 04:58:02 1.160.2.5.2.3
+++ loncom/publisher/lonpubdir.pm 2015/12/03 20:40:46 1.165
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Authoring Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.160.2.5.2.3 2024/02/28 04:58:02 raeburn Exp $
+# $Id: lonpubdir.pm,v 1.165 2015/12/03 20:40:46 damieng Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -67,7 +67,9 @@ sub handler {
$r->send_http_header;
&Apache::lonhtmlcommon::clear_breadcrumbs();
- $r->print(&Apache::loncommon::start_page('Authoring Space').
+ my $js = '';
+ $r->print(&Apache::loncommon::start_page('Authoring Space', $js).
'
'.
'
'.
&mt('Your Authoring Space is currently in the location used by LON-CAPA version 2.10 and older, but your domain is using a newer LON-CAPA version ([_1]).',$version).'
'.
@@ -80,7 +82,7 @@ sub handler {
}
}
$thisdisfn=~s/^\Q$docroot\E\/priv//;
-
+
my $resdir=$docroot.'/res'.$thisdisfn; # Resource directory
my $targetdir='/res'.$thisdisfn; # Publication target directory.
my $linkdir='/priv'.$thisdisfn; # Full URL name of constr space.
@@ -91,10 +93,10 @@ sub handler {
my $current_disk_usage = &Apache::lonnet::diskusage($udom,$uname,
"$londocroot/priv/$udom/$uname"); # expressed in kB
my $disk_quota = &Apache::loncommon::get_user_quota($uname,$udom,
- 'author'); # expressed in MB
+ 'author'); # expressed in MB
# Put out the start of page.
- &startpage($r, $uname, $udom, $thisdisfn, $current_disk_usage, $disk_quota);
+ &startpage($r, $uname, $udom, $thisdisfn, $current_disk_usage, $disk_quota);
if (!-d $fn) {
if (-e $fn) {
@@ -199,7 +201,15 @@ sub handler {
.$columns{$key}{text}.$arrows[$idx].'' :
'
'
+ .&Apache::loncommon::end_page()
+ );
+ return OK;
}
@@ -327,7 +348,6 @@ sub handler {
# $thisdisfn - Displayable version of the filename.
# $current_disk_usage - User's current disk usage (in kB).
# $disk_quota - Disk quota for user's authoring space (in MB).
-# $crstype - Course type, if this is for "course author"
sub startpage {
my ($r, $uname, $udom, $thisdisfn, $current_disk_usage, $disk_quota) = @_;
@@ -347,17 +367,15 @@ sub startpage {
# in start_page->bodytag->innerregister
$env{'request.noversionuri'}=$formaction;
- $r->print(&Apache::loncommon::start_page('Authoring Space'));
+ my $js = '';
+ $r->print(&Apache::loncommon::start_page('Authoring Space', $js));
- my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'};
- my $current_disk_usage = &Apache::lonnet::diskusage($udom,$uname,"$londocroot/priv/$udom/$uname");
- my $disk_quota = &Apache::loncommon::get_user_quota($uname,$udom,'author'); #expressed in MB
$disk_quota = 1024 * $disk_quota; # convert from MB to kB
$r->print(&Apache::loncommon::head_subbox(
'
'
.&Apache::loncommon::CSTR_pageheader()));
@@ -506,6 +524,9 @@ sub dircontrols {
go => 'Go',
prnt => 'Print contents of directory',
crea => 'Create a new directory or LON-CAPA document',
+ qs => 'Quick Search',
+ cs => 'Case Sensitive',
+ re => 'Regular Expression',
acti => 'Actions for current directory',
updc => 'Upload a new document',
pick => 'Please select an action to perform using the new filename',
@@ -514,7 +535,7 @@ sub dircontrols {
# Calculate free space in bytes.
# $disk_quota is in MB and $current_disk_usage is in kB
my $free_space = 1024 * ((1024 * $disk_quota) - $current_disk_usage);
- $r->print(<printf(<
-
-
-
-
END
@@ -628,26 +661,26 @@ END
sub resourceactions {
my ($r,$uname,$udom,$thisdisfn) = @_;
$r->print(<
+
-
+
-
+
-
+
-
+
-
+
END
@@ -725,7 +758,7 @@ sub putdirectory {
} else {
$actionitem =
'