--- loncom/publisher/lonpubdir.pm 2023/07/13 21:41:40 1.179 +++ 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.179 2023/07/13 21:41:40 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; } @@ -105,7 +105,7 @@ sub handler { 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) { @@ -133,7 +133,7 @@ sub handler { 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,21 +237,21 @@ my $result = "'; $r->print(&Apache::loncommon::start_page($title, $js)); @@ -423,9 +423,9 @@ parent.lastknownpriv='/priv$esc_thisdisf function checkUpload(theform) { if (theform.file == '') { alert("Please use 'Browse..' to choose a file first, before uploading") - return + return } - theform.submit() + theform.submit() } function SetPubDir(theform,printForm) { @@ -511,7 +511,7 @@ sub dircontrols { pubr => 'Publish this Resource', rtrv => 'Retrieve Old Version', list => 'List Directory', - uplo => 'Upload file', + uplo => 'Upload file', dele => 'Delete', sela => 'Select Action', nfil => 'New file', @@ -541,7 +541,7 @@ sub dircontrols { nanf => 'Name of New File', nans => 'Name of New Subdirectory', psfn => 'Please specify file name', - ); + ); &js_escape(\%js_lt); my $mytype = $lt{'type'}; # avoid conflict with " and ' in javascript # Calculate free space in bytes. @@ -587,7 +587,7 @@ END 'newtaskfile','newlibraryfile', 'newdir')); } - my $selectbox = &Apache::loncommon::select_form('none','action',\%fileoptions); + my $selectbox = &Apache::loncommon::select_form('none','action',\%fileoptions); $r->print(<
@@ -746,9 +746,9 @@ sub putdirectory { my ($r, $reqfile, $here, $dirname, $modtime, $targetdir, $bombs, $numdir) = @_; # construct the display filename: the directory name unless ..: - + my $actionitem; - + my $disfilename = $dirname; # Don't display directory itself, and there is no way up from root directory unless ((($dirname eq '..') && ($reqfile=~/^\/[^\/]+\/[^\/]+$/)) || ($dirname eq '.')) { @@ -771,7 +771,7 @@ sub putdirectory { $actionitem = &mt('Go to ...'); $disfilename = ''.&mt('Parent Directory').''; } else { - $actionitem = + $actionitem = ''. '