--- loncom/interface/portfolio.pm 2024/12/29 21:44:16 1.254.2.7
+++ loncom/interface/portfolio.pm 2021/11/30 15:55:37 1.265
@@ -1,7 +1,7 @@
# The LearningOnline Network
# portfolio browser
#
-# $Id: portfolio.pm,v 1.254.2.7 2024/12/29 21:44:16 raeburn Exp $
+# $Id: portfolio.pm,v 1.265 2021/11/30 15:55:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -237,7 +237,7 @@ sub display_directory_line {
if ($lock_info) {
my %anchor_fields = ('lockinfo' => $fullpath);
if ($versions) { # hold the folder open
- my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($fullpath);
+ my ($fname,$version,$extension) = &Apache::lonnet::file_name_version_ext($fullpath);
$fname =~ s|^/||;
$anchor_fields{'showversions'} = $fname.'.'.$extension;
}
@@ -267,7 +267,7 @@ sub display_directory_line {
sub display_directory {
my ($r,$url,$current_path,$is_empty,$dir_list,$group,$can_upload,
- $can_modify,$can_delete,$can_setacl,$caller)=@_;
+ $can_modify,$can_delete,$can_setacl)=@_;
my $iconpath= $r->dir_config('lonIconsURL') . "/";
my $select_mode;
my $checked_files;
@@ -311,15 +311,6 @@ sub display_directory {
&mt('Using the portfolio file list'))
.'
'
);
- my ($acl_helpfile,$acl_helplink);
- if ($caller eq 'coursegrp_portfolio') {
- $acl_helpfile = 'Portfolio ShareFile Group';
- } elsif ($can_setacl) {
- $acl_helpfile = 'Portfolio ShareFile';
- }
- if ($acl_helpfile) {
- $acl_helplink = &Apache::loncommon::help_open_topic($acl_helpfile);
- }
$r->print(&Apache::loncommon::start_data_table()
.&Apache::loncommon::start_data_table_header_row()
.''.&mt('Actions'). &Apache::loncommon::help_open_topic('Portfolio FileAction').' | '
@@ -329,7 +320,7 @@ sub display_directory {
.''.&mt('Size').' | '
.''.&mt('Last Modified').' | '
.' | '
- .''.&mt('Current Access Status').$acl_helplink.' | '
+ .''.&mt('Current Access Status').&Apache::loncommon::help_open_topic('Portfolio ShareFile').' | '
.&Apache::loncommon::end_data_table_header_row());
}
@@ -379,7 +370,7 @@ sub display_directory {
} (@{$dir_list})) {
my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$dir_line,16);
$filename =~ s/\s+$//;
- my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($filename);
+ my ($fname,$version,$extension) = &Apache::lonnet::file_name_version_ext($filename);
if ($version) {
my $fullpath = &prepend_group($current_path.$fname.'.'.$extension);
push(@{ $versioned{$fullpath} },
@@ -392,7 +383,7 @@ sub display_directory {
my $zerobyte;
foreach my $dir_line (@dir_lines) {
my ($filename,$dom,$testdir,$size,$mtime,$obs) = @$dir_line;
- my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($filename);
+ my ($fname,$version,$extension) = &Apache::lonnet::file_name_version_ext($filename);
if (($filename ne '.') && ($filename ne '..') && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/)) {
my $version_flag;
my $show_versions;
@@ -2754,7 +2745,7 @@ sub handler {
my $js = '';
-
+
if ($env{"form.mode"} eq 'selectfile'){
$r->print(&Apache::loncommon::start_page($title, $js,
{'only_body' => 1}));
@@ -3000,8 +2991,7 @@ sub handler {
&display_common($r,$url,$current_path,$is_empty,$dirlistref,
$can_upload,$group);
&display_directory($r,$url,$current_path,$is_empty,$dirlistref,$group,
- $can_upload,$can_modify,$can_delete,$can_setacl,
- $caller);
+ $can_upload,$can_modify,$can_delete,$can_setacl);
}
$r->print(&Apache::loncommon::end_page());
return OK;