version 1.152, 2006/08/09 17:47:26
|
version 1.153, 2006/08/11 23:45:18
|
Line 169 sub display_directory_line {
|
Line 169 sub display_directory_line {
|
$href_location, $url, $current_path, $access_admin_text, $versions)=@_; |
$href_location, $url, $current_path, $access_admin_text, $versions)=@_; |
# my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); |
# my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); |
$r->print('<tr class="'.$css_class.'">'); |
$r->print('<tr class="'.$css_class.'">'); |
$r->print($line); |
$r->print($line); # contains first two cells of table |
$r->print('<td><img alt="" src="'.&Apache::loncommon::icon($filename).'" /></td>'); |
if ($$version_flag{$filename}) { # versioned can't be versioned, so TRUE when root file |
$r->print('<td>'.$$version_flag{$filename}.'</td><td>'); |
$r->print('<td><img alt="" src="'.&Apache::loncommon::icon($filename).'" /></td>'); |
$r->print(&make_anchor($href_location.$filename,undef,$filename).'</td>'); |
$r->print('<td>'.$$version_flag{$filename}.'</td>'); |
|
} else { # this is a graded or handed back file |
|
$r->print('<td colspan="2"> </td>'); |
|
} |
|
# $r->print('<td>'.$$version_flag{$filename}.'</td><td>'); |
|
$r->print('<td>'.&make_anchor($href_location.$filename,undef,$filename).'</td>'); |
$r->print('<td>'.$size.'</td>'); |
$r->print('<td>'.$size.'</td>'); |
$r->print('<td>'.&Apache::lonlocal::locallocaltime($mtime).'</td>'); |
$r->print('<td>'.&Apache::lonlocal::locallocaltime($mtime).'</td>'); |
if ($select_mode ne 'true') { |
if ($select_mode ne 'true') { |
Line 474 sub done {
|
Line 479 sub done {
|
unless (defined $message) { |
unless (defined $message) { |
$message='Done'; |
$message='Done'; |
} |
} |
my $result = '<h3><a href="'.$url.'?currentpath='. |
my %anchor_fields = ( |
$env{'form.currentpath'}. |
'currentpath' => $env{'form.currentpath'}, |
'&fieldname='.$env{'form.fieldname'}. |
'fieldname' => $env{'form.fieldname'}, |
'&mode='.$env{'form.mode'}. |
'mode' => $env{'form.mode'} |
&group_args(); |
); |
$result .= '">'.&mt($message).'</a></h3>'; |
my $result = '<h3>'.&make_anchor($url,\%anchor_fields,&mt($message)).'</h3>'; |
return $result; |
return $result; |
} |
} |
|
|
Line 615 sub display_access {
|
Line 620 sub display_access {
|
my %access_controls = &Apache::lonnet::get_access_controls($current_permissions,$group,$file_name); |
my %access_controls = &Apache::lonnet::get_access_controls($current_permissions,$group,$file_name); |
my $aclcount = keys(%access_controls); |
my $aclcount = keys(%access_controls); |
my $header = '<h3>'.&mt('Allowing others to retrieve file: [_1]',$port_path.$env{'form.currentpath'}.$env{'form.access'}).'</h3>'; |
my $header = '<h3>'.&mt('Allowing others to retrieve file: [_1]',$port_path.$env{'form.currentpath'}.$env{'form.access'}).'</h3>'; |
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.').'<br /><ul><li>'.&mt('Public files are available to anyone without the need for login.').'</li><li>'.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.').'</li><li>'.&mt('Conditional files are accessible to logged-in users with accounts in the LON-CAPA network, who satisfy the conditions you set.').'<br />'.&mt('The conditions can include affiliation with a particular course or group, or a user account in a specific domain.').'<br />'.&mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.').'</li></ul>'; |
my $info .= &mt('Access to this file by others can be set to be one or '); |
|
$info .= &mt('more of the following types: public, passphrase-protected or conditional.'); |
|
$info .= '<br /><ul><li>'.&mt('Public files are available to anyone without the need for login.'); |
|
$info .= '</li><li>'.&mt('Passphrase-protected files do not require log-in, but will require '); |
|
$info .= &mt('the viewer to enter the passphrase you set.'); |
|
$info .= '</li><li>'.&mt('Conditional files are accessible to logged-in users with accounts '); |
|
$info .= &mt('in the LON-CAPA network, who satisfy the conditions you set.').'<br />'; |
|
$info .= &mt('The conditions can include affiliation with a particular course or group, '); |
|
$info .= &mt('or a user account in a specific domain.').'<br />'; |
|
$info .= &mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.').'</li></ul>'; |
if ($group eq '') { |
if ($group eq '') { |
$info .= (&mt("Direct others to the 'Display file listing' link (shown when there are viewable files) on your personal information page:<br /><a href='/adm/$udom/$uname/aboutme'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme</a>")); |
$info .= (&mt("Direct others to the 'Display file listing' link (shown when there are viewable files) on your personal information page:<br /><a href='/adm/$udom/$uname/aboutme'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme</a>")); |
} |
} |
Line 661 sub view_access_settings {
|
Line 674 sub view_access_settings {
|
} else { |
} else { |
$r->print(&mt('No access control settings currently exist for this file.<br />' )); |
$r->print(&mt('No access control settings currently exist for this file.<br />' )); |
} |
} |
$r->print('<br /><a href="'.$url.'?currentpath='.$env{'form.currentpath'}. |
my %anchor_fields = ( |
&group_args().'">'.&mt('Return to directory listing').'</a>'); |
'currentpath' => $env{'form.currentpath'} |
|
); |
|
$r->print('<br />'.&make_anchor($url, \%anchor_fields, &mt('Return to directory listing'))); |
return; |
return; |
} |
} |
|
|
Line 886 sub update_access {
|
Line 901 sub update_access {
|
} |
} |
&close_form($r,$url); |
&close_form($r,$url); |
} else { |
} else { |
$r->print('<br /><a href="'.$url.'?access='.$env{'form.selectfile'}. |
my %anchor_fields = ( |
'&currentpath='.$env{'form.currentpath'}.&group_args().'">'. |
'currentpath' => $env{'form.currentpath'}, |
&mt('Display all access settings for this file').'</a>'. |
'access' => $env{'form.selectfile'} |
' '. |
); |
'<a href="'.$url.'?currentpath='.$env{'form.currentpath'}. |
$r->print('<br />'.&make_anchor($url, \%anchor_fields, &mt('Display all access settings for this file'))); |
&group_args().'">'.&mt('Return to directory listing').'</a>'); |
delete $anchor_fields{'access'}; |
|
$r->print(' '.&make_anchor($url,\%anchor_fields,&mt('Return to directory listing'))); |
} |
} |
return; |
return; |
} |
} |