--- loncom/homework/grades.pm 2003/11/10 16:35:57 1.154 +++ loncom/homework/grades.pm 2003/11/10 16:39:41 1.156 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.154 2003/11/10 16:35:57 albertel Exp $ +# $Id: grades.pm,v 1.156 2003/11/10 16:39:41 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -691,8 +691,11 @@ LISTJAVASCRIPT $status{'resource.'.$partid.'.submitted_by'}.'" />'; } } - next if (!$submitted && ($submitonly eq 'yes' || $submitonly eq 'graded')); - next if (!$graded && $submitonly eq 'graded'); + next if (!$submitted && ($submitonly eq 'yes' || + $submitonly eq 'incorrect' || + $submitonly eq 'graded')); + next if (!$graded && ($submitonly eq 'graded' || + $submitonly eq 'incorrect')); } $ctr++; @@ -749,8 +752,7 @@ LISTJAVASCRIPT sub processGroup { my ($request) = shift; my $ctr = 0; - my @stuchecked = (ref($ENV{'form.stuinfo'}) ? @{$ENV{'form.stuinfo'}} - : ($ENV{'form.stuinfo'})); + my @stuchecked = &Apache::loncommon::get_env_multiple('form.stuinfo'); my $total = scalar(@stuchecked)-1; foreach (@stuchecked) { @@ -1829,12 +1831,7 @@ sub processHandGrade { $ENV{'form.msgsub'},$message); } if ($ENV{'form.collaborator'.$ctr}) { - my @collabstrs; - if (ref($ENV{'form.collaborator'.$ctr}) eq 'ARRAY') { - @collabstrs=@{$ENV{'form.collaborator'.$ctr}}; - } else { - @collabstrs=$ENV{'form.collaborator'.$ctr}; - } + my @collabstrs=&Apache::loncommon::get_env_multiple("form.collaborator$ctr"); foreach my $collabstr (@collabstrs) { my ($part,@collaborators) = split(/:/,$collabstr); foreach (@collaborators) { @@ -1956,7 +1953,7 @@ sub processHandGrade { foreach my $student (@parsedlist) { my $submitonly=$ENV{'form.submitonly'}; my ($uname,$udom) = split(/:/,$student); - if ($submitonly =~ /^(yes|graded)$/) { + if ($submitonly =~ /^(yes|graded|incorrect)$/) { # my %record = &Apache::lonnet::restore($symb,$ENV{'request.course.id'},$udom,$uname); my %status=&student_gradeStatus($url,$symb,$udom,$uname,$partlist); my $submitted = 0; @@ -1969,8 +1966,11 @@ sub processHandGrade { $submitted = 0; } } - next if (!$submitted && ($submitonly eq 'yes' || $submitonly eq 'graded')); - next if (!$graded && $submitonly eq 'graded'); + next if (!$submitted && ($submitonly eq 'yes' || + $submitonly eq 'incorrect' || + $submitonly eq 'graded')); + next if (!$graded && ($submitonly eq 'graded' || + $submitonly eq 'incorrect')); } push @nextlist,$student if ($ctr < $ntstu); last if ($ctr == $ntstu); @@ -3784,16 +3784,17 @@ GRADINGMENUJS $result.=''."\n". ' Select Section:   '; $result.='Student Status:'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,1,undef); - if (ref($sections)) { - $result.=' (Section "no" implies the students were not assigned a section.)
' - if (grep /no/,@$sections); + if (ref($sections) && (grep /no/,@$sections)) { + $result.=' (Section "no" implies the students were not assigned a section.)
'; } $result.=''; @@ -3805,6 +3806,8 @@ GRADINGMENUJS ($saveSub eq 'yes' ? 'selected="on"' : '').'>with submissions'. ''. + ''. ''."\n";