');
$r->print($line); # contains first two cells of table
- $filename = $filename;
- $filename = &prepend_group($filename);
my $lock_info;
- if ($$version_flag{$filename}) { # versioned can't be versioned, so TRUE when root file
+ if ($version_flag) { # versioned can't be versioned, so TRUE when root file
$r->print('
');
- $r->print('
'.$$version_flag{$filename}.'
');
+ $r->print('
'.$version_flag.'
');
} else { # this is a graded or handed back file
my ($user,$domain) = &get_name_dom();
my $permissions_hash = &Apache::lonnet::get_portfile_permissions($domain,$user);
- if (defined($filename) && defined($$permissions_hash{'/'.$filename})) {
- foreach my $array_item (@{$$permissions_hash{'/'.$filename}}) {
+ if (defined($$permissions_hash{$fullpath})) {
+ foreach my $array_item (@{$$permissions_hash{$fullpath}}) {
if (ref($array_item) eq 'ARRAY') {
- if ($$array_item[(@$array_item - 1)] eq 'handback') {
+ if ($$array_item[-1] eq 'handback') {
$lock_info = 'Handback';
- } elsif ($$array_item[(@$array_item - 1)] eq 'graded') {
+ } elsif ($$array_item[-1] eq 'graded') {
$lock_info = 'Graded';
}
}
}
}
- if ($lock_info) {
- my %anchor_fields = (
- 'lockinfo' => '/'.$filename
- );
- $lock_info = &make_anchor(undef,\%anchor_fields,$lock_info);
- }
- $r->print('
'.$lock_info.'
');
+ if ($lock_info) {
+ my %anchor_fields = ('lockinfo' => $fullpath);
+ $lock_info = &make_anchor(undef,\%anchor_fields,$lock_info);
+ }
+ $r->print('
'.&mt('Allowing others to retrieve file: [_1]',$port_path.$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.');
+ my $info .= &mt('Access to this file by others can be set to be one or more of the following types: public or passphrase-protected.');
$info .= '
'.&mt('Public files are available to anyone without the need for login.');
$info .= '
'.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.');
- $info .= '
'.&mt('Conditional files are accessible to logged-in users with accounts in the LON-CAPA network, who satisfy the conditions you set.').' ';
- $info .= &mt('The conditions can include affiliation with a particular course or group, or a user account in a specific domain.').' ';
- $info .= &mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.').'
';
+# $info .= '
'.&mt('Conditional files are accessible to logged-in users with accounts in the LON-CAPA network, who satisfy the conditions you set.').' ';
+# $info .= &mt('The conditions can include affiliation with a particular course or group, or a user account in a specific domain.').' ';
+# $info .= &mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.');
+ $info .= '
';
if ($group eq '') {
$info .= (&mt("Direct others to the 'Display file listing' link (shown when there are viewable files) on your personal information page: http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme"));
}
@@ -1095,24 +1090,24 @@ sub access_setting_table {
$passwd.'" />');
$r->print(&Apache::loncommon::end_data_table_row());
$r->print(&Apache::loncommon::end_data_table());
- $r->print('