--- loncom/interface/portfolio.pm 2004/12/04 18:37:36 1.61 +++ loncom/interface/portfolio.pm 2004/12/06 18:13:10 1.63 @@ -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 + $javascript .= 'fileList = "'.$java_files.'";'; + $javascript .= (< ENDSMP - $r->print($java_script); + $r->print($javascript); $r->print("

Select portfolio files

Check as many as you wish in response to the essay problem.
"); $r->print("Files selected from other directories:
");