--- loncom/interface/portfolio.pm 2004/10/12 00:44:05 1.48
+++ loncom/interface/portfolio.pm 2004/12/06 18:13:10 1.63
@@ -33,8 +33,8 @@ use Apache::lonlocal;
# receives a file name and path stub from username/userfiles/portfolio/
# returns an anchor tag consisting encoding filename and currentpath
sub make_anchor {
- my ($filename, $current_path) = @_;
- my $anchor = ''.$filename.'';
+ my ($filename, $current_path, $current_mode, $field_name) = @_;
+ my $anchor = ''.$filename.'';
return $anchor;
}
my $dirptr=16384;
@@ -44,8 +44,11 @@ sub display_common {
$r->print('
');
$r->print('');
my $displayOut = '';
$r->print($displayOut);
@@ -53,23 +56,25 @@ sub display_common {
$displayOut = '';
$r->print($displayOut);
$r->print(' |
');
my @tree = split (/\//,$current_path);
- $r->print(''.&make_anchor('portfolio','/').'/');
+ $r->print(''.&make_anchor('portfolio','/',$ENV{"form.mode"},$ENV{"form.fieldname"}).'/');
if (@tree > 1){
my $newCurrentPath = '';
for (my $i = 1; $i< @tree; $i++){
$newCurrentPath .= $tree[$i].'/';
- $r->print(&make_anchor($tree[$i],'/'.$newCurrentPath).'/');
+ $r->print(&make_anchor($tree[$i],'/'.$newCurrentPath, $ENV{"form.mode"},$ENV{"form.fieldname"}).'/');
}
}
$r->print('');
&Apache::lonhtmlcommon::store_recent('portfolio',$current_path,$current_path);
- #Fixme -- remove from recent those paths that are deleted
- $r->print('
");
@@ -78,6 +83,12 @@ sub display_directory {
my ($r,$current_path,$is_empty,$dir_list)=@_;
my $iconpath= $r->dir_config('lonIconsURL') . "/";
my $display_out;
+ my %locked_files=&Apache::lonnet::dump('file_permissions',
+ $ENV{'user.domain'},$ENV{'user.name'});
+ my $locked_file;
+ foreach my $key (keys %locked_files) {
+ $locked_file .= $locked_files{$key}.':';
+ }
if ($is_empty && ($current_path ne '/')) {
$display_out = '