--- loncom/homework/grades.pm 2006/05/29 18:51:35 1.302.2.6 +++ loncom/homework/grades.pm 2006/01/25 22:56:25 1.304 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.302.2.6 2006/05/29 18:51:35 albertel Exp $ +# $Id: grades.pm,v 1.304 2006/01/25 22:56:25 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1577,7 +1577,7 @@ sub submission { } my $overRideScore = $env{'form.overRideScore'} eq '' ? 'no' : $env{'form.overRideScore'}; - $request->print('
'."\n". + $request->print(''."\n". ''."\n". ''."\n". ''."\n". @@ -1807,9 +1807,14 @@ KEYWORDS } if (@files) { $lastsubonly.='
Like all files provided by users, this file may contain virusses
'; + my $file_counter = 0; foreach my $file (@files) { + $file_counter ++; &Apache::lonnet::allowuploaded('/adm/grades',$file); $lastsubonly.='
'.$file.''; + $lastsubonly.='Return commented document to student. '."\n"; + $lastsubonly.=''; + } $lastsubonly.='
'; } @@ -2040,6 +2045,14 @@ sub processHandGrade { } } } + if ($env{'form.returndoc1'}) { + # if multiple files are uploaded names will be 'returndoc2', 'returndoc3' + my $file_counter = 1; + while ($env{'form.returndoc'.$file_counter}) { + $request->print("Will upload document".$env{'form.returndocorig'.$file_counter}); + $file_counter ++; + } + } $ctr++; } } @@ -2248,7 +2261,7 @@ sub saveHandGrade { my $solvedstatus = $record{'resource.'.$new_part.'.solved'}; if ($aggtries > 0) { - &decrement_aggs($symb,$new_part,\%aggregate,$aggtries,$totaltries,$solvedstatus); + &decrement($symb,$new_part,\%aggregate,$aggtries,$totaltries,$solvedstatus); $aggregateflag = 1; } } elsif ($dropMenu eq '') { @@ -3291,13 +3304,8 @@ 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; - } - } + my %sone=&Apache::loncommon::record_sep($records[0]); + $keyfields=join(',',sort(keys(%sone))); } } &csvuploadmap_footer($request,$i,$keyfields); @@ -3459,7 +3467,7 @@ sub csvuploadassign { } $request->print("
Stored $countdone students\n"); if (@skipped) { - $request->print('

Skipped Students

'); + $request->print('Skipped Students

'); foreach my $student (@skipped) { $request->print("$student
\n"); } } if (@notallowed) { @@ -3679,7 +3687,7 @@ sub displayPage { if($curRes == $iterator->BEGIN_MAP) { $depth++; } if($curRes == $iterator->END_MAP) { $depth--; } - if (ref($curRes) && $curRes->is_problem()) { + if (ref($curRes) && $curRes->is_problem() && !$curRes->randomout) { my $parts = $curRes->parts(); my $title = $curRes->compTitle(); my $symbx = $curRes->symb(); @@ -3876,7 +3884,7 @@ sub updateGradeByPage { if($curRes == $iterator->BEGIN_MAP) { $depth++; } if($curRes == $iterator->END_MAP) { $depth--; } - if (ref($curRes) && $curRes->is_problem()) { + if (ref($curRes) && $curRes->is_problem() && !$curRes->randomout) { my $parts = $curRes->parts(); my $title = $curRes->compTitle(); my $symbx = $curRes->symb(); @@ -4063,11 +4071,11 @@ sub scantron_CODElist { sub scantron_CODEunique { my $result=' + value="Yes" checked="on" /> Yes + value="No" /> No '; return $result; }