--- loncom/interface/portfolio.pm 2023/01/23 18:09:36 1.254.2.6.2.1
+++ loncom/interface/portfolio.pm 2024/12/29 21:44:16 1.254.2.7
@@ -1,7 +1,7 @@
# The LearningOnline Network
# portfolio browser
#
-# $Id: portfolio.pm,v 1.254.2.6.2.1 2023/01/23 18:09:36 raeburn Exp $
+# $Id: portfolio.pm,v 1.254.2.7 2024/12/29 21:44:16 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -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)=@_;
+ $can_modify,$can_delete,$can_setacl,$caller)=@_;
my $iconpath= $r->dir_config('lonIconsURL') . "/";
my $select_mode;
my $checked_files;
@@ -311,6 +311,15 @@ 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').' | '
@@ -320,7 +329,7 @@ sub display_directory {
.''.&mt('Size').' | '
.''.&mt('Last Modified').' | '
.' | '
- .''.&mt('Current Access Status').&Apache::loncommon::help_open_topic('Portfolio ShareFile').' | '
+ .''.&mt('Current Access Status').$acl_helplink.' | '
.&Apache::loncommon::end_data_table_header_row());
}
@@ -897,8 +906,6 @@ sub display_access {
my $aclcount = keys(%access_controls);
my ($header,$info);
if ($action eq 'chgaccess') {
- my $uhome = &Apache::lonnet::homeserver($uname,$udom);
- my $prefix = &Apache::lonnet::url_prefix($r,$udom,$uhome,'web');
$header =
''
.&mt('Allowing others to retrieve file: [_1]'
@@ -911,13 +918,13 @@ sub display_access {
$info .= '
'.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.');
$info .= ''.&explain_conditionals();
$info .= ''.
- &mt('A listing of files viewable without log-in is available at: ')."$prefix/adm/$udom/$uname/aboutme/portfolio.
";
+ &mt('A listing of files viewable without log-in is available at: ')."".&Apache::lonnet::absolute_url()."/adm/$udom/$uname/aboutme/portfolio.
";
if ($group eq '') {
$info .= &mt("For logged in users a 'Display file listing' link will also appear (when there are viewable files) on your personal information page:");
} else {
$info .= &mt("For logged in users a 'Display file listing' link will also appear (when there are viewable files) on the course information page:");
}
- $info .= "
$prefix/adm/$udom/$uname/aboutme
";
+ $info .= "
".&Apache::lonnet::absolute_url()."/adm/$udom/$uname/aboutme
";
if ($group ne '') {
$info .= &mt("Users with course editing rights may add a 'Group Portfolio' item using the Course Editor (Collaboration tab), to provide access to viewable group portfolio files.").'
';
}
@@ -2993,7 +3000,8 @@ 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);
+ $can_upload,$can_modify,$can_delete,$can_setacl,
+ $caller);
}
$r->print(&Apache::loncommon::end_page());
return OK;