--- loncom/publisher/lonpubdir.pm 2023/06/10 23:01:15 1.175
+++ loncom/publisher/lonpubdir.pm 2023/07/14 18:01:23 1.180
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Authoring Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.175 2023/06/10 23:01:15 raeburn Exp $
+# $Id: lonpubdir.pm,v 1.180 2023/07/14 18:01:23 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -48,7 +48,7 @@ sub handler {
# Validate access to the construction space and get username:domain.
- my ($uname,$udom)=&Apache::lonnet::constructaccess($r->uri);
+ my ($uname,$udom)=&Apache::lonnet::constructaccess($r->uri);
unless (($uname) && ($udom)) {
return HTTP_NOT_ACCEPTABLE;
}
@@ -104,8 +104,8 @@ sub handler {
"$londocroot/priv/$udom/$uname"); # expressed in kB
my $disk_quota = &Apache::loncommon::get_user_quota($uname,$udom,
$cstr,$crstype); # expressed in MB
-
# Put out the start of page.
+
&startpage($r, $uname, $udom, $thisdisfn, $current_disk_usage, $disk_quota, $crsauthor);
if (!-d $fn) {
@@ -128,12 +128,12 @@ sub handler {
}
# Put out actions for directory, browse/upload + new file page.
- &dircontrols($r,$uname,$udom,$thisdisfn, $current_disk_usage, $disk_quota);
+ &dircontrols($r,$uname,$udom,$thisdisfn,$current_disk_usage,$disk_quota,$crsauthor);
&resourceactions($r,$uname,$udom,$thisdisfn); # Put out form used for printing/deletion etc.
my $numdir = 0;
my $numres = 0;
-
+
if ((@files == 0) && ($thisdisfn =~ m{^/$match_domain/$match_username})) {
if ($thisdisfn =~ m{^/$match_domain/$match_username$}) {
$r->print('
'.&mt('This Authoring Space is currently empty.').'
');
@@ -192,7 +192,7 @@ sub handler {
order => 'ascending',
text => &mt('Size').' (kB)',
},
- );
+ );
# Print column headers
my $output = '';
@@ -237,18 +237,23 @@ my $result = "';
$r->print(&Apache::loncommon::start_page($title, $js));
$disk_quota = 1024 * $disk_quota; # convert from MB to kB
+ my $headertext = &mt('Directory');
+ if ($crsauthor) {
+ $headertext = &mt('Course Authoring Directory');
+ }
$r->print(&Apache::loncommon::head_subbox(
'