--- loncom/interface/portfolio.pm 2006/06/23 20:15:24 1.120
+++ loncom/interface/portfolio.pm 2006/07/19 10:26:43 1.121.2.6
@@ -1,3 +1,8 @@
+# The LearningOnline Network
+# portfolio browser
+#
+# $Id: portfolio.pm,v 1.121.2.6 2006/07/19 10:26:43 albertel Exp $
+#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -31,6 +36,7 @@ use Apache::lonfeedback;
use Apache::lonlocal;
use Apache::lonnet;
use Apache::longroup;
+use Apache::lonhtmlcommon;
use HTML::Entities;
use LONCAPA;
@@ -219,7 +225,7 @@ sub display_directory {
}
my $fullpath = $current_path.$filename;
$fullpath = &prepend_group($fullpath,$group);
- if ($select_mode eq 'true'){
+ if ($select_mode eq 'true') {
$line='
'.$/);
}
}
}
if ($select_mode eq 'true') {
$r->print('
-
-
-
+
+
+
@@ -517,7 +527,7 @@ sub rename_confirmed {
}
sub display_access {
- my ($r,$url,$group,$can_setacl) = @_;
+ my ($r,$url,$group,$can_setacl,$port_path) = @_;
my ($uname,$udom) = &get_name_dom($group);
my $file_name = $env{'form.currentpath'}.$env{'form.access'};
$file_name = &prepend_group($file_name,$group);
@@ -525,8 +535,23 @@ sub display_access {
$uname);
my %access_controls = &Apache::lonnet::get_access_controls($current_permissions,$group,$file_name);
my $aclcount = keys(%access_controls);
- my $header = '
'.&mt('Allowing others to retrieve portfolio file: [_1]',$env{'form.currentpath'}.$env{'form.access'}).'
';
- my $info .= &mt('Access to this file by others can be set to be one or more of the following types: public, passphrase-protected or conditional.').'
'.&mt('Public files are available to anyone without the need for login.').'
'.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.').'
'.&mt('Conditional files are accessible to logged-in users with accounts in the LON-CAPA network, who satisfy the conditions you set.').' '.&mt('The conditions can include affiliation with a particular course or group, or a user account in a specific domain.').' '.&mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.').'
';
+ my $info .=
+ &mt('Access to this file by others can be set to be one or more of the following types: public, passphrase-protected or conditional.').
+ '
'.
+ &mt('Public files are available to anyone without the need for login.').
+ '
'.
+ &mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.').
+ '
'.
+ #'
'.
+ #&mt('Conditional files are accessible to logged-in users with accounts in the LON-CAPA network, who satisfy the conditions you set.').
+ #' '.
+ #&mt('The conditions can include affiliation with a particular course or group, or a user account in a specific domain.').
+ #' '.
+ #&mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.').
+ '
';
if ($can_setacl) {
&open_form($r,$url);
$r->print($header.$info);
@@ -656,11 +681,11 @@ sub build_access_summary {
} else {
$r->print(join(',',@{$content->{'roles'}{$id}{$item}}));
}
- $r->print('');
+ $r->print('');
}
+ $r->print("");
}
- $r->print(&Apache::loncommon::end_data_table_row());
- $r->print(&Apache::loncommon::end_data_table());
+ $r->print("");
} elsif ($scope eq 'domains') {
$r->print(&mt('Domains: ').join(',',@{$content->{'dom'}}));
} elsif ($scope eq 'users') {
@@ -681,7 +706,7 @@ sub build_access_summary {
sub update_access {
- my ($r,$url,$group) = @_;
+ my ($r,$url,$group,$port_path) = @_;
my $totalprocessed = 0;
my %processing;
my %title = (
@@ -707,7 +732,7 @@ sub update_access {
}
my $file_name = $env{'form.currentpath'}.$env{'form.selectfile'};
$r->print('
'.&mt('Allowing others to retrieve portfolio file: [_1]',
- $file_name).'
'."\n");
+ $port_path.$file_name).''."\n");
$file_name = &prepend_group($file_name,$group);
my ($uname,$udom) = &get_name_dom($group);
my ($errors,$outcome,$deloutcome,$new_values,$translation);
@@ -803,7 +828,10 @@ sub update_access {
}
$r->print(' '.
- &mt('Display all access settings for this file').'');
+ &mt('Display all access settings for this file').''.
+ ' '.
+ ''.&mt('Return to directory listing').'');
}
return;
}
@@ -973,24 +1001,25 @@ sub access_setting_table {
$passwd.'" />');
$r->print(&Apache::loncommon::end_data_table_row());
$r->print(&Apache::loncommon::end_data_table());
- $r->print('