version 1.308, 2006/01/31 17:47:53
|
version 1.310, 2006/02/07 13:38:16
|
Line 1812 KEYWORDS
|
Line 1812 KEYWORDS
|
$file_counter ++; |
$file_counter ++; |
&Apache::lonnet::allowuploaded('/adm/grades',$file); |
&Apache::lonnet::allowuploaded('/adm/grades',$file); |
$lastsubonly.='<br /><a href="'.$file.'" target="lonGRDs"><img src="'.&Apache::loncommon::icon($file).'" border=0"> '.$file.'</a>'; |
$lastsubonly.='<br /><a href="'.$file.'" target="lonGRDs"><img src="'.&Apache::loncommon::icon($file).'" border=0"> '.$file.'</a>'; |
$lastsubonly.='Return commented document to student. <input type="file" name="returndoc'.$file_counter.'" />'."\n"; |
$lastsubonly.=' Return commented document to student. <input type="file" name="part'.$partid.'_returndoc'; |
|
$lastsubonly.=$file_counter.'" />'."\n"; |
$lastsubonly.='<input type="hidden" name="returndocorig'.$file_counter.'" value="'.$file.'" />'; |
$lastsubonly.='<input type="hidden" name="returndocorig'.$file_counter.'" value="'.$file.'" />'; |
|
|
} |
} |
Line 2029 sub processHandGrade {
|
Line 2030 sub processHandGrade {
|
my @collabstrs=&Apache::loncommon::get_env_multiple("form.collaborator$ctr"); |
my @collabstrs=&Apache::loncommon::get_env_multiple("form.collaborator$ctr"); |
foreach my $collabstr (@collabstrs) { |
foreach my $collabstr (@collabstrs) { |
my ($part,@collaborators) = split(/:/,$collabstr); |
my ($part,@collaborators) = split(/:/,$collabstr); |
foreach (@collaborators) { |
foreach my $collaborator (@collaborators) { |
my ($errorflag,$pts,$wgt) = |
my ($errorflag,$pts,$wgt) = |
&saveHandGrade($request,$url,$symb,$_,$udom,$ctr, |
&saveHandGrade($request,$url,$symb,$collaborator,$udom,$ctr, |
$env{'form.unamedom'.$ctr},$part); |
$env{'form.unamedom'.$ctr},$part); |
if ($errorflag eq 'not_allowed') { |
if ($errorflag eq 'not_allowed') { |
$request->print("<font color=\"red\">Not allowed to modify grades for $_:$udom</font>"); |
$request->print("<font color=\"red\">Not allowed to modify grades for $collaborator:$udom</font>"); |
next; |
next; |
} else { |
} else { |
if ($message ne '') { |
if ($message ne '') { |
$msgstatus = &Apache::lonmsg::user_normal_msg($_,$udom,$env{'form.msgsub'},$message); |
$msgstatus = &Apache::lonmsg::user_normal_msg($collaborator,$udom,$env{'form.msgsub'},$message); |
} |
} |
|
|
} |
} |
} |
} |
} |
} |
} |
} |
if ($env{'form.returndoc1'}) { |
|
# if multiple files are uploaded names will be 'returndoc2', 'returndoc3' |
|
my $file_counter = 1; |
|
while ($env{'form.returndoc'.$file_counter}) { |
|
my $fname=$env{'form.returndoc'.$file_counter.'.filename'}; |
|
$request->print("<br />".$fname." will be the uploaded file name"); |
|
$request->print("<font color=\"red\">Will upload document</font>".$env{'form.returndocorig'.$file_counter}); |
|
$file_counter ++; |
|
} |
|
} |
|
$ctr++; |
$ctr++; |
} |
} |
} |
} |
Line 2234 sub saveHandGrade {
|
Line 2224 sub saveHandGrade {
|
my @parts = split(/:/,$env{'form.partlist'.$newflg}); |
my @parts = split(/:/,$env{'form.partlist'.$newflg}); |
foreach my $new_part (@parts) { |
foreach my $new_part (@parts) { |
#collaborator may vary for different parts |
#collaborator may vary for different parts |
|
$request->print('form.part'.$new_part.'_returndoc1'); |
if ($submitter && $new_part ne $part) { next; } |
if ($submitter && $new_part ne $part) { next; } |
my $dropMenu = $env{'form.GD_SEL'.$newflg.'_'.$new_part}; |
my $dropMenu = $env{'form.GD_SEL'.$newflg.'_'.$new_part}; |
if ($dropMenu eq 'excused') { |
if ($dropMenu eq 'excused') { |
Line 2302 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 multiple files are uploaded names will be 'returndoc2', 'returndoc3' |
|
my $portfolio_root = &Apache::loncommon::propath($domain, |
|
$stuname). |
|
'/userfiles/portfolio'; |
|
$request->print('<br>'.$portfolio_root.'<br>'); |
|
# my $result=&Apache::lonnet::userfileupload('uploaddoc','', |
|
# 'portfolio'.$env{'form.currentpath'}); |
|
|
|
my $file_counter = 1; |
|
while ($env{'form.'.$new_part.'_returndoc'.$file_counter}) { |
|
my $fname=$env{'form.returndoc'.$file_counter.'.filename'}; |
|
$request->print("<br />".$fname." will be the uploaded file name"); |
|
$request->print("<font color=\"red\">Will upload document</font>".$env{'form.returndocorig'.$file_counter}); |
|
$file_counter++; |
|
} |
|
} |
|
|
# unless problem has been graded, set flag to version the submitted files |
# unless problem has been graded, set flag to version the submitted files |
unless ($record{'resource.'.$new_part.'.solved'} =~ /^correct_/ || |
unless ($record{'resource.'.$new_part.'.solved'} =~ /^correct_/ || |
$record{'resource.'.$new_part.'.solved'} eq 'incorrect_by_override' || |
$record{'resource.'.$new_part.'.solved'} eq 'incorrect_by_override' || |
Line 3326 sub csvuploadmap {
|
Line 3336 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); |
my %sone=&Apache::loncommon::record_sep($records[0]); |
foreach my $rec (@records) { |
$keyfields=join(',',sort(keys(%sone))); |
my %temp = &Apache::loncommon::record_sep($rec); |
|
if (%temp) { |
|
$keyfields=join(',',sort(keys(%temp))); |
|
last; |
|
} |
|
} |
} |
} |
} |
} |
&csvuploadmap_footer($request,$i,$keyfields); |
&csvuploadmap_footer($request,$i,$keyfields); |