--- loncom/interface/portfolio.pm 2004/12/04 18:37:36 1.61 +++ loncom/interface/portfolio.pm 2004/12/04 19:08:42 1.62 @@ -361,11 +361,23 @@ sub select_files { # 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); + } else { + if ($ENV{'form.currentpath'} eq '/') { + #empty the file for a fresh start + # &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; + if ($java_files) { + $java_files.=','; } my $java_script =(< function finishSelect() { - fileList = ""; +ENDSMP + $java_script .= 'fileList = "'.$java_files.'";'; + $java_script .= (<