-
- $text{'upload_label'}
- |
-
+
+
+
+ $text{'upload_label'}
+ |
+ $groupitem
+ |
-
-
-
+
+
+
TABLE
my @tree = split (/\//,$current_path);
- $r->print(''.&make_anchor('portfolio','/',$env{"form.mode"},$env{"form.fieldname"},$env{"form.continue"}).'/');
+ $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++){
$newCurrentPath .= $tree[$i].'/';
- $r->print(&make_anchor($tree[$i],'/'.$newCurrentPath, $env{"form.mode"},$env{"form.fieldname"}, $env{"form.continue"}).'/');
+ $r->print(&make_anchor($url,$tree[$i],'/'.$newCurrentPath, $env{"form.mode"},$env{"form.fieldname"}, $env{"form.continue"},$group).'/');
}
}
$r->print('');
- &Apache::lonhtmlcommon::store_recent('portfolio',$current_path,$current_path);
- $r->print(' ");
}
sub display_directory {
- my ($r,$current_path,$is_empty,$dir_list)=@_;
+ my ($r,$url,$current_path,$is_empty,$dir_list,$group)=@_;
my $iconpath= $r->dir_config('lonIconsURL') . "/";
+ my ($groupitem,$groupecho);
my $display_out;
my $select_mode;
my $checked_files;
- my %locked_files = &Apache::lonnet::get_marked_as_readonly_hash ($env{'user.domain'},$env{'user.name'});
+ my $port_path = &get_port_path($group);
+ my ($uname,$udom) = &get_name_dom($group);
+ if (defined($group)) {
+ $groupitem = '';
+ $groupecho = '&group='.$group;
+ }
+ 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($env{'user.name'},$env{'form.currentpath'});
+ $checked_files =&Apache::lonnet::files_in_path($uname,$env{'form.currentpath'});
$select_mode = 'true';
}
if ($is_empty && ($current_path ne '/')) {
- $display_out = ' |