print("CHECKED");
}
@@ -351,13 +352,15 @@ sub select_files {
if ($env{'form.continue'} eq 'true') {
# here we update the selections for the currentpath
# eventually, have to handle removing those not checked, but . . .
- my @items=&Apache::loncommon::get_env_multiple('form.selectfile');
- &Apache::lonnet::save_selected_files($env{'user.name'}, $env{'form.currentpath'}, @items);
+ my @items=&Apache::loncommon::get_env_multiple('form.checkfile');
+ if (scalar(@items)){
+ &Apache::lonnet::logthis("one of the items is $items[0]");
+ &Apache::lonnet::save_selected_files($env{'user.name'}, $env{'form.currentpath'}, @items);
+ }
} else {
- if ($env{'form.currentpath'} eq '/') {
#empty the file for a fresh start
- # &Apache::lonnet::clear_selected_files($env{'user.name'});
- }
+ &Apache::lonnet::logthis("Clearing saved files");
+ &Apache::lonnet::clear_selected_files($env{'user.name'});
}
my @files = &Apache::lonnet::files_not_in_path($env{'user.name'}, $env{'form.currentpath'});
my $java_files = join ",", @files;
@@ -446,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 {
@@ -497,7 +516,7 @@ sub handler {
'/userfiles/portfolio';
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['selectfile','currentpath','meta','lockinfo',
- 'currentfile','action','fieldname','mode','rename']);
+ 'currentfile','action','fieldname','mode','rename','continue']);
&Apache::loncommon::no_cache($r);
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;