--- loncom/interface/portfolio.pm 2006/07/19 10:26:43 1.121.2.6
+++ loncom/interface/portfolio.pm 2006/06/27 15:38:54 1.123
@@ -1,8 +1,3 @@
-# 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).
@@ -36,7 +31,6 @@ use Apache::lonfeedback;
use Apache::lonlocal;
use Apache::lonnet;
use Apache::longroup;
-use Apache::lonhtmlcommon;
use HTML::Entities;
use LONCAPA;
@@ -225,7 +219,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='
print('
');
+ $r->print($line);
}
- $r->print('
');
- $r->print($line);
- my $curr_access;
- if ($select_mode ne 'true') {
- my $pub_access = 0;
- my $guest_access = 0;
- my $cond_access = 0;
- foreach my $key (sort(keys(%{$access_controls{$fullpath}}))) {
- my ($num,$scope,$end,$start) = &unpack_acc_key($key);
- if (($now > $start) && (!$end || $end > $now)) {
- if ($scope eq 'public') {
- $pub_access = 1;
- } elsif ($scope eq 'guest') {
- $guest_access = 1;
- } else {
- $cond_access = 1;
- }
- }
- }
- if (!$pub_access && !$guest_access && !$cond_access) {
- $curr_access = &mt('Private');
- } else {
- my @allaccesses;
- if ($pub_access) {
- push(@allaccesses,&mt('Public'));
- }
- if ($guest_access) {
- push(@allaccesses,&mt('Passphrase-protected'));
- }
- if ($cond_access) {
- push(@allaccesses,&mt('Conditional'));
- }
- $curr_access = join('+ ',@allaccesses);
- }
- }
- $r->print('
';
- 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 $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.').'
';
if ($can_setacl) {
&open_form($r,$url);
$r->print($header.$info);
@@ -706,7 +681,7 @@ sub build_access_summary {
sub update_access {
- my ($r,$url,$group,$port_path) = @_;
+ my ($r,$url,$group) = @_;
my $totalprocessed = 0;
my %processing;
my %title = (
@@ -732,7 +707,7 @@ sub update_access {
}
my $file_name = $env{'form.currentpath'}.$env{'form.selectfile'};
$r->print('
'.&mt('Allowing others to retrieve portfolio file: [_1]',
- $port_path.$file_name).'
'."\n");
+ $file_name).''."\n");
$file_name = &prepend_group($file_name,$group);
my ($uname,$udom) = &get_name_dom($group);
my ($errors,$outcome,$deloutcome,$new_values,$translation);
@@ -828,10 +803,7 @@ sub update_access {
}
$r->print(' '.
- &mt('Display all access settings for this file').''.
- ' '.
- ''.&mt('Return to directory listing').'');
+ &mt('Display all access settings for this file').'');
}
return;
}
@@ -1001,25 +973,24 @@ sub access_setting_table {
$passwd.'" />');
$r->print(&Apache::loncommon::end_data_table_row());
$r->print(&Apache::loncommon::end_data_table());
-
- #$r->print('