version 1.310, 2006/02/07 13:38:16
|
version 1.311, 2006/02/07 14:18:18
|
Line 2293 sub saveHandGrade {
|
Line 2293 sub saveHandGrade {
|
$newrecord{'resource.'.$new_part.'.regrader'}= |
$newrecord{'resource.'.$new_part.'.regrader'}= |
"$env{'user.name'}:$env{'user.domain'}"; |
"$env{'user.name'}:$env{'user.domain'}"; |
} |
} |
$request->print('form.part'.$new_part.'_returndoc1'); |
|
if ($env{'form.part'.$new_part.'_returndoc1'}) { |
if ($env{'form.part'.$new_part.'_returndoc1'}) { |
# if multiple files are uploaded names will be 'returndoc2', 'returndoc3' |
# if multiple files are uploaded names will be 'returndoc2','returndoc3' |
|
|
my $portfolio_root = &Apache::loncommon::propath($domain, |
my $portfolio_root = &Apache::loncommon::propath($domain, |
$stuname). |
$stuname). |
'/userfiles/portfolio'; |
'/userfiles/portfolio'; |
$request->print('<br>'.$portfolio_root.'<br>'); |
$request->print('<br>'.$portfolio_root.'<br>'); |
|
|
# my $result=&Apache::lonnet::userfileupload('uploaddoc','', |
# my $result=&Apache::lonnet::userfileupload('uploaddoc','', |
# 'portfolio'.$env{'form.currentpath'}); |
# 'portfolio'.$env{'form.currentpath'}); |
|
|
my $file_counter = 1; |
my $file_counter = 1; |
while ($env{'form.'.$new_part.'_returndoc'.$file_counter}) { |
while ($env{'form.part'.$new_part.'_returndoc'.$file_counter}) { |
my $fname=$env{'form.returndoc'.$file_counter.'.filename'}; |
my $fname=$env{'form.returndoc'.$file_counter.'.filename'}; |
|
$newrecord{'resource.'.$new_part.'.handback'} = $env{'form.returndocorig'.$file_counter}; |
$request->print("<br />".$fname." will be the uploaded file name"); |
$request->print("<br />".$fname." will be the uploaded file name"); |
$request->print("<font color=\"red\">Will upload document</font>".$env{'form.returndocorig'.$file_counter}); |
$request->print("<font color=\"red\">Will upload document</font>".$env{'form.returndocorig'.$file_counter}); |
$file_counter++; |
$file_counter++; |
Line 3336 sub csvuploadmap {
|
Line 3338 sub csvuploadmap {
|
unshift(@fields,['none','']); |
unshift(@fields,['none','']); |
$i=&Apache::loncommon::csv_samples_select_table($request,\@records, |
$i=&Apache::loncommon::csv_samples_select_table($request,\@records, |
\@fields); |
\@fields); |
foreach my $rec (@records) { |
foreach my $rec (@records) { |
my %temp = &Apache::loncommon::record_sep($rec); |
my %temp = &Apache::loncommon::record_sep($rec); |
if (%temp) { |
if (%temp) { |
$keyfields=join(',',sort(keys(%temp))); |
$keyfields=join(',',sort(keys(%temp))); |
last; |
last; |
} |
} |
} |
} |
} |
} |
} |
} |
&csvuploadmap_footer($request,$i,$keyfields); |
&csvuploadmap_footer($request,$i,$keyfields); |