--- loncom/interface/portfolio.pm 2004/11/25 23:56:19 1.58 +++ loncom/interface/portfolio.pm 2004/12/04 02:15:42 1.60 @@ -159,6 +159,7 @@ sub display_file_select { my ($r,$current_path,$is_empty,$dir_list)=@_; my $iconpath= $r->dir_config('lonIconsURL') . "/"; my $display_out; + my %checked_files = &Apache::lonnet::files_in_path($ENV{'user.name'}, $ENV{'form.currentpath'}); if ($is_empty && ($current_path ne '/')) { $display_out = '
'. ''. @@ -205,6 +206,10 @@ sub display_file_select { } } $r->print(' + + + +
'); @@ -339,7 +344,7 @@ sub rename_confirmed { my $result= &Apache::lonnet::renameuserfile($ENV{'user.name'},$ENV{'user.domain'}, 'portfolio'.$ENV{'form.currentpath'}.$ENV{'form.selectfile'}, - 'portfolio'.$ENV{'form.currentpath'}.$ENV{'form.filenewname'}); + 'portfolio'.$ENV{'form.currentpath'}.$filenewname); if ($result ne 'ok') { $r->print(' An errror occured ('.$result. ') while trying to rename '.&display_file().' to '. @@ -349,6 +354,12 @@ sub rename_confirmed { } sub select_files { my ($r)=@_; + 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.selectedfile'); + &Apache::lonnet::save_selected_files($ENV{'user.name'}, $ENV{'form.currentpath'}, @items); + } my $java_script =(< function finishSelect() { @@ -370,6 +381,10 @@ ENDSMP $r->print($java_script); $r->print("

Select portfolio files

Check as many as you wish in response to the essay problem.
"); + $r->print("Files selected:
"); + foreach (&Apache::lonnet::files_not_in_path($ENV{'user.name'}, $ENV{'form.currentpath'})) { + $r->print($_."
"); + } } sub upload { my ($r)=@_;