version 1.161, 2006/08/24 17:38:21
|
version 1.163, 2006/09/19 14:02:42
|
Line 294 sub display_directory {
|
Line 294 sub display_directory {
|
my $version_flag; |
my $version_flag; |
my $show_versions; |
my $show_versions; |
my $fullpath = &prepend_group($current_path.$filename); |
my $fullpath = &prepend_group($current_path.$filename); |
if ($env{'form.showversions'} eq $filename) { |
if ($env{'form.showversions'} =~ /$filename/) { |
$show_versions = 'true'; |
$show_versions = 'true'; |
} |
} |
if (exists($versioned{$fullpath})) { |
if (exists($versioned{$fullpath})) { |
Line 304 sub display_directory {
|
Line 304 sub display_directory {
|
'currentpath' => $current_path, |
'currentpath' => $current_path, |
); |
); |
if ($show_versions) { |
if ($show_versions) { |
|
# Must preserve other possible showversion files |
|
my $version_remainder = $env{'form.showversions'}; |
|
$version_remainder =~ s/$filename//g; |
|
$anchor_fields{'showversions'} = $version_remainder; |
$version_flag = &make_anchor('portfolio',\%anchor_fields, |
$version_flag = &make_anchor('portfolio',\%anchor_fields, |
'<img class="LC_icon" alt="'.&mt('opened folder').'" src="'.$iconpath.'folder_pointer_opened.gif" />'); |
'<img class="LC_icon" alt="'.&mt('opened folder').'" src="'.$iconpath.'folder_pointer_opened.gif" />'); |
} else { |
} else { |
$anchor_fields{'showversions'} = $filename; |
# allow multiple files to show versioned |
|
$anchor_fields{'showversions'} = $env{'form.showversions'}.','.$filename; |
$version_flag = &make_anchor('portfolio',\%anchor_fields, |
$version_flag = &make_anchor('portfolio',\%anchor_fields, |
'<img class="LC_icon" alt="'.&mt('closed folder').'" src="'.$iconpath.'folder_pointer_closed.gif" />'); |
'<img class="LC_icon" alt="'.&mt('closed folder').'" src="'.$iconpath.'folder_pointer_closed.gif" />'); |
} |
} |
Line 1683 sub createdir {
|
Line 1688 sub createdir {
|
} |
} |
|
|
sub get_portfolio_root { |
sub get_portfolio_root { |
my ($udom,$uname) = @_; |
my ($udom,$uname,$group) = @_; |
if (!(defined($udom)) || !(defined($uname))) { |
if (!(defined($udom)) || !(defined($uname))) { |
($uname,$udom) = &get_name_dom(); |
($uname,$udom) = &get_name_dom(); |
} |
} |
my $path; |
my $path = '/userfiles/portfolio'; |
if (defined($env{'form.group'})) { |
if (!defined($group)) { |
$path = '/userfiles/groups/'.$env{'form.group'}.'/portfolio'; |
if (defined($env{'form.group'})) { |
} else { |
$group = $env{'form.group'}; |
$path = '/userfiles/portfolio'; |
} |
} |
} |
|
if (defined($group)) { |
|
$path = '/userfiles/groups/'.$group.'/portfolio'; |
|
} |
return (&Apache::loncommon::propath($udom,$uname).$path); |
return (&Apache::loncommon::propath($udom,$uname).$path); |
} |
} |
|
|