');
+ $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
+ $r->print('
');
+ $r->print('
'.$$version_flag{$filename}.'
');
+ } 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 (ref($array_item) eq 'ARRAY') {
+ if ($$array_item[(@$array_item - 1)] eq 'handback') {
+ $lock_info = 'Handback';
+ } elsif ($$array_item[(@$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('
'.$/);
}
sub display_directory {
- my ($r,$url,$current_path,$is_empty,$dir_list,$can_upload,
+ my ($r,$url,$current_path,$is_empty,$dir_list,$group,$can_upload,
$can_modify,$can_delete,$can_setacl)=@_;
my $iconpath= $r->dir_config('lonIconsURL') . "/";
my $display_out;
my $select_mode;
my $checked_files;
- my $port_path = &get_port_path($group);
- my ($uname,$udom) = &get_name_dom($group);
+ my $port_path = &get_port_path();
+ my ($uname,$udom) = &get_name_dom();
my $access_admin_text = &mt('View Status');
if ($can_setacl) {
$access_admin_text = &mt('View/Change Status');
@@ -206,11 +254,11 @@ sub display_directory {
if ($select_mode eq 'true') {
$r->print('