');
+ $r->print(&Apache::loncommon::start_data_table_row());
$r->print($line); # contains first two cells of table
my $lock_info;
if ($version_flag) { # versioned can't be versioned, so TRUE when root file
- $r->print('
');
+ $r->print('
');
$r->print('
'.$version_flag.'
');
} else { # this is a graded or handed back file
- my ($user,$domain) = &get_name_dom();
+ my ($user,$domain) = &get_name_dom($env{'form.group'});
my $permissions_hash = &Apache::lonnet::get_portfile_permissions($domain,$user);
if (defined($$permissions_hash{$fullpath})) {
foreach my $array_item (@{$$permissions_hash{$fullpath}}) {
@@ -212,15 +268,19 @@ sub display_directory_line {
$r->print('
'.$/);
+ $r->print(&Apache::loncommon::end_data_table_row().$/);
}
sub display_directory {
@@ -231,7 +291,7 @@ sub display_directory {
my $select_mode;
my $checked_files;
my $port_path = &get_port_path();
- my ($uname,$udom) = &get_name_dom();
+ my ($uname,$udom) = &get_name_dom($group);
my $access_admin_text = &mt('View Status');
if ($can_setacl) {
$access_admin_text = &mt('View/Change Status');
@@ -252,7 +312,9 @@ sub display_directory {
$display_out = '';
@@ -262,21 +324,30 @@ sub display_directory {
}
if ($select_mode eq 'true') {
$r->print(''
@@ -531,12 +613,12 @@ sub done {
}
sub delete {
- my ($r,$url)=@_;
+ my ($r,$url,$group)=@_;
my @check;
my $file_name = $env{'form.currentpath'}.$env{'form.selectfile'};
$file_name = &prepend_group($file_name);
my @files=&Apache::loncommon::get_env_multiple('form.selectfile');
- my ($uname,$udom) = &get_name_dom();
+ my ($uname,$udom) = &get_name_dom($group);
if (&Apache::lonnet::is_locked($file_name,$udom,$uname) eq 'true') {
$r->print(&mt('The file is locked and cannot be deleted.').' ');
$r->print(&done('Back',$url));
@@ -556,7 +638,7 @@ sub delete_confirmed {
my ($r,$url,$group)=@_;
my @files=&Apache::loncommon::get_env_multiple('form.selectfile');
my $result;
- my ($uname,$udom) = &get_name_dom();
+ my ($uname,$udom) = &get_name_dom($group);
my $port_path = &get_port_path();
my $current_permissions = &Apache::lonnet::get_portfile_permissions($udom,
$uname);
@@ -615,10 +697,10 @@ sub delete_dir {
}
sub delete_dir_confirmed {
- my ($r,$url)=@_;
+ my ($r,$url,$group)=@_;
my $directory_name = $env{'form.currentpath'};
$directory_name =~ s|/$||; # remove any trailing slash
- my ($uname,$udom) = &get_name_dom();
+ my ($uname,$udom) = &get_name_dom($group);
my $namespace = &get_namespace();
my $port_path = &get_port_path();
my $result=&Apache::lonnet::removeuserfile($uname,$udom,$port_path.
@@ -643,9 +725,9 @@ sub delete_dir_confirmed {
}
sub rename {
- my ($r,$url)=@_;
+ my ($r,$url,$group)=@_;
my $file_name = $env{'form.currentpath'}.$env{'form.rename'};
- my ($uname,$udom) = &get_name_dom();
+ my ($uname,$udom) = &get_name_dom($group);
$file_name = &prepend_group($file_name);
if (&Apache::lonnet::is_locked($file_name,$udom,$uname) eq 'true') {
$r->print("The file is locked and cannot be renamed. ");
@@ -653,7 +735,7 @@ sub rename {
} else {
&open_form($r,$url);
$r->print('
'.&mt('Rename [_1] to [_2]?', &display_file()
- , '').'
');
+ , '').'');
&close_form($r,$url);
}
}
@@ -661,7 +743,7 @@ sub rename {
sub rename_confirmed {
my ($r,$url,$group)=@_;
my $filenewname=&Apache::lonnet::clean_filename($env{'form.filenewname'});
- my ($uname,$udom) = &get_name_dom();
+ my ($uname,$udom) = &get_name_dom($group);
my $port_path = &get_port_path();
if ($filenewname eq '') {
$r->print(''.
@@ -745,7 +827,7 @@ sub access_for_renamed {
sub display_access {
my ($r,$url,$group,$can_setacl,$port_path,$action) = @_;
- my ($uname,$udom) = &get_name_dom();
+ my ($uname,$udom) = &get_name_dom($group);
my $file_name = $env{'form.currentpath'}.$env{'form.access'};
$file_name = &prepend_group($file_name);
my $current_permissions = &Apache::lonnet::get_portfile_permissions($udom,
@@ -760,13 +842,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 .= '