--- loncom/interface/portfolio.pm 2005/04/12 01:15:46 1.83
+++ loncom/interface/portfolio.pm 2005/04/29 16:51:42 1.84
@@ -125,7 +125,7 @@ sub display_directory {
#$dom
my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16);
$filename =~ s/\s+$//;
- if (($filename ne '.') && ($filename ne '..') && ($filename !~ /\.meta$/ )) {
+ if (($filename ne '.') && ($filename ne '..') && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(.*)\.(.*)/)) {
if ($dirptr&$testdir) {
if ($select_mode eq 'true'){
$r->print('
| ');
@@ -449,7 +449,23 @@ sub upload {
}
sub lock_info {
my ($r) = @_;
- $r->print("lock info here");
+ my %current_permissions = &Apache::lonnet::dump('file_permissions',$env{'user.domain'},$env{'user.name'});
+ my $file_name = $env{'form.lockinfo'};
+ #my %locked_files = &Apache::lonnet::get_marked_as_readonly_hash ($env{'user.domain'},$env{'user.name'});
+ foreach my $key (keys(%current_permissions)) {
+ if ($file_name eq $key) {
+ $r->print("$key = ");
+ foreach my $array_item (@{$current_permissions{$key}}) {
+ if (ref($array_item)) {
+ $r->print(&Apache::lonnet::gettitle($$array_item[0]).' is the problem
');
+ $r->print(&Apache::lonnet::coursedescription($$array_item[1]).' is the course
');
+ # $r->print('the third is '.$$array_item[2].'
');
+ # $r->print("item is $$array_item[0]
and $$array_item[0]");
+ }
+ }
+ }
+ }
+ #$r->print("lock info here");
return 'ok';
}
sub createdir {