"; # Close off the extra row and start a new one.
$headings_done = 1;
}
@@ -2487,9 +2493,9 @@ BUTTONS
&HTML::Entities::encode(&$valueFunc($resource),"<>&\"'");
if ($addparts && (scalar(@{$resource->parts}) > 1)) {
$col .= "";
}
@@ -2534,7 +2540,8 @@ RADIO
'closeAllPages' => $self->{'closeallpages'},
'suppressEmptySequences' => $self->{'suppressEmptySequences'},
'include_top_level_map' => $self->{'include_top_level_map'},
- 'iterator_map' => $mapUrl }
+ 'iterator_map' => $mapUrl,
+ 'map_no_edit_link' => 1, }
);
$result .= $buttons;
@@ -2971,30 +2978,31 @@ BUTTONS
}
# Get the list of files in this directory.
- my @fileList;
+ my (@fileList,$listref,$listerror);
# If the subdirectory is in local CSTR space
my $metadir;
- if ($subdir =~ m|/home/([^/]+)/public_html/(.*)|) {
- my ($user,$domain)=
- &Apache::loncacc::constructaccess($subdir,
- $Apache::lonnet::perlvar{'lonDefDomain'});
- $metadir='/res/'.$domain.'/'.$user.'/'.$2;
- @fileList = &Apache::lonnet::dirlist($subdir,$domain,$user,undef,undef,'/');
- } elsif ($subdir =~ m|^~([^/]+)/(.*)$|) {
- $subdir='/home/'.$1.'/public_html/'.$2;
+ my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'};
+ if ($subdir =~ m{^(?:\Q$londocroot\E)*/priv/[^/]+/[^/]+/(.*)$}) {
+ my $innerpath=$1;
+ unless ($subdir=~m{^\Q$londocroot\E}) {
+ $subdir=$londocroot.$subdir;
+ }
my ($user,$domain)=
- &Apache::loncacc::constructaccess($subdir,
- $Apache::lonnet::perlvar{'lonDefDomain'});
- $metadir='/res/'.$domain.'/'.$user.'/'.$2;
- @fileList = &Apache::lonnet::dirlist($subdir,$domain,$user,undef,undef,'/');
+ &Apache::lonnet::constructaccess($subdir);
+ $metadir='/res/'.$domain.'/'.$user.'/'.$innerpath;
+ ($listref,$listerror) =
+ &Apache::lonnet::dirlist($subdir,$domain,$user,undef,undef,'/');
} else {
# local library server resource space
- @fileList = &Apache::lonnet::dirlist($subdir,$env{'user.domain'},$env{'user.name'},undef,undef,'/');
+ ($listref,$listerror) =
+ &Apache::lonnet::dirlist($subdir,$env{'user.domain'},$env{'user.name'},undef,undef,'/');
}
# Sort the fileList into order
- @fileList = sort {lc($a) cmp lc($b)} @fileList;
+ if (ref($listref) eq 'ARRAY') {
+ @fileList = sort {lc($a) cmp lc($b)} @{$listref};
+ }
$result .= $buttons;
@@ -3089,7 +3097,7 @@ sub fileState {
}
my $docroot = $Apache::lonnet::perlvar{'lonDocRoot'};
my $subdirpart = $constructionSpaceDir;
- $subdirpart =~ s/^\/home\/$uname\/public_html//;
+ $subdirpart =~ s{^\Q$docroot/priv/$udom/$uname\E}{};
my $resdir = $docroot . '/res/' . $udom . '/' . $uname .
$subdirpart;
@@ -3364,7 +3372,7 @@ sub render {
$result .= '
' . $self->{ERROR_MSG} . '
';
}
- $result .= '{'variable'} . '_forminput"';
if (defined($self->{'size'})) {
$result .= ' size="' . $self->{'size'} . '"';
@@ -3626,7 +3634,7 @@ sub render {
my @results;
# Collect all the results
- for my $stateName (keys %{$helper->{STATES}}) {
+ for my $stateName (keys(%{$helper->{STATES}})) {
my $state = $helper->{STATES}->{$stateName};
for my $element (@{$state->{ELEMENTS}}) {