-
- $text{'upload_label'}
- |
- $groupitem
+ my $escuri = &HTML::Entities::encode($r->uri,'&<>"');
+ $r->print(<<"TABLE");
+
+
+
+ $text{'upload_label'}
+ |
+
+ |
-
-
-
+
+
+
TABLE
+ }
my @tree = split (/\//,$current_path);
- $r->print(''.&make_anchor($url,$port_path,'/',$env{"form.mode"},$env{"form.fieldname"},$env{"form.continue"},$group).'/');
+ $r->print(''.&make_anchor($url,$port_path,'/',$env{"form.mode"},$env{"form.fieldname"},$env{"form.continue"},$group).'/');
if (@tree > 1){
my $newCurrentPath = '';
for (my $i = 1; $i< @tree; $i++){
@@ -103,11 +111,11 @@ TABLE
$r->print(&make_anchor($url,$tree[$i],'/'.$newCurrentPath, $env{"form.mode"},$env{"form.fieldname"}, $env{"form.continue"},$group).'/');
}
}
- $r->print('');
+ $r->print('');
&Apache::lonhtmlcommon::store_recent($namespace,$current_path,$current_path);
- $r->print(' ");
}
sub display_directory {
- my ($r,$url,$current_path,$is_empty,$dir_list,$group)=@_;
+ my ($r,$url,$current_path,$is_empty,$dir_list,$group,$can_upload,
+ $can_modify,$can_delete,$can_setacl)=@_;
my $iconpath= $r->dir_config('lonIconsURL') . "/";
my ($groupitem,$groupecho);
my $display_out;
@@ -123,18 +132,27 @@ sub display_directory {
my $checked_files;
my $port_path = &get_port_path($group);
my ($uname,$udom) = &get_name_dom($group);
- my $namespace = &get_namespace($group);
- if (defined($group)) {
+ my $access_admin_text = &mt('View Status');
+ if ($can_setacl) {
+ $access_admin_text = &mt('View/Change Status');
+ }
+ if ((defined($group)) && (defined($env{'request.course.id'}))) {
$groupitem = '';
$groupecho = '&group='.$group;
}
- my %locked_files = &Apache::lonnet::get_marked_as_readonly_hash ($namespace,$udom,$uname);
+
+ my $current_permissions = &Apache::lonnet::get_portfile_permissions($udom,
+ $uname);
+ my %locked_files = &Apache::lonnet::get_marked_as_readonly_hash(
+ $current_permissions,$group);
+ my %access_controls = &Apache::lonnet::get_access_controls($current_permissions,$group);
+ my $now = time;
if ($env{"form.mode"} eq 'selectfile'){
&select_files($r);
$checked_files =&Apache::lonnet::files_in_path($uname,$env{'form.currentpath'});
$select_mode = 'true';
}
- if ($is_empty && ($current_path ne '/')) {
+ if ($is_empty && ($current_path ne '/') && $can_delete) {
$display_out = ' |