version 1.61, 2004/12/04 18:37:36
|
version 1.62, 2004/12/04 19:08:42
|
Line 361 sub select_files {
|
Line 361 sub select_files {
|
# eventually, have to handle removing those not checked, but . . . |
# eventually, have to handle removing those not checked, but . . . |
my @items=&Apache::loncommon::get_env_multiple('form.selectedfile'); |
my @items=&Apache::loncommon::get_env_multiple('form.selectedfile'); |
&Apache::lonnet::save_selected_files($ENV{'user.name'}, $ENV{'form.currentpath'}, @items); |
&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 =(<<ENDSMP); |
my $java_script =(<<ENDSMP); |
<script language='javascript'> |
<script language='javascript'> |
function finishSelect() { |
function finishSelect() { |
fileList = ""; |
ENDSMP |
|
$java_script .= 'fileList = "'.$java_files.'";'; |
|
$java_script .= (<<ENDSMP); |
for (i=0;i<document.forms.checkselect.length;i++) { |
for (i=0;i<document.forms.checkselect.length;i++) { |
if (document.forms.checkselect[i].checked){ |
if (document.forms.checkselect[i].checked){ |
fileList = fileList + document.forms.checkselect.currentpath.value + document.forms.checkselect[i].value + "," ; |
fileList = fileList + document.forms.checkselect.currentpath.value + document.forms.checkselect[i].value + "," ; |