--- loncom/homework/grades.pm 2006/02/07 13:38:16 1.310
+++ loncom/homework/grades.pm 2006/02/07 14:18:18 1.311
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.310 2006/02/07 13:38:16 banghart Exp $
+# $Id: grades.pm,v 1.311 2006/02/07 14:18:18 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2293,19 +2293,21 @@ sub saveHandGrade {
$newrecord{'resource.'.$new_part.'.regrader'}=
"$env{'user.name'}:$env{'user.domain'}";
}
- $request->print('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,
$stuname).
'/userfiles/portfolio';
$request->print('
'.$portfolio_root.'
');
+
# my $result=&Apache::lonnet::userfileupload('uploaddoc','',
# 'portfolio'.$env{'form.currentpath'});
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'};
+ $newrecord{'resource.'.$new_part.'.handback'} = $env{'form.returndocorig'.$file_counter};
$request->print("
".$fname." will be the uploaded file name");
$request->print("Will upload document".$env{'form.returndocorig'.$file_counter});
$file_counter++;
@@ -3336,13 +3338,13 @@ sub csvuploadmap {
unshift(@fields,['none','']);
$i=&Apache::loncommon::csv_samples_select_table($request,\@records,
\@fields);
- foreach my $rec (@records) {
- my %temp = &Apache::loncommon::record_sep($rec);
- if (%temp) {
- $keyfields=join(',',sort(keys(%temp)));
- last;
- }
- }
+ foreach my $rec (@records) {
+ my %temp = &Apache::loncommon::record_sep($rec);
+ if (%temp) {
+ $keyfields=join(',',sort(keys(%temp)));
+ last;
+ }
+ }
}
}
&csvuploadmap_footer($request,$i,$keyfields);