--- loncom/homework/grades.pm 2003/07/14 16:11:19 1.115 +++ loncom/homework/grades.pm 2003/07/15 20:59:53 1.116 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.115 2003/07/14 16:11:19 ng Exp $ +# $Id: grades.pm,v 1.116 2003/07/15 20:59:53 ng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -418,7 +418,7 @@ LISTJAVASCRIPT my $checklastsub = $ENV{'form.handgrade'} eq 'yes' ? '' : 'checked'; my $gradeTable='
'."\n"); $request->print(&show_grading_menu_form($symb,$url)) if (($ENV{'form.command'} eq 'submission') || @@ -1388,7 +1394,7 @@ KEYWORDS my ($partid,$respid) = split(/_/); next if ($seen{$partid} > 0); $seen{$partid}++; - next if ($$handgrade{$_} =~ /:no$/); +# next if ($$handgrade{$_} =~ /:no$/); push @partlist,$partid; $request->print(&gradeBox($request,$symb,$uname,$udom,$counter,$partid,\%record)); @@ -1977,6 +1983,7 @@ sub viewgrades { my (@parts) = sort(&getpartlist($url)); foreach my $part (@parts) { my $display=&Apache::lonnet::metadata($url,$part.'.display'); + next if ($display =~ /Number of Attempts/); if (!$display) { $display = &Apache::lonnet::metadata($url,$part.'.name'); } if ($display =~ /^Partial Credit Factor/) { my ($partid) = &split_part_type($part); @@ -2007,7 +2014,8 @@ sub viewgrades { 'onClick="javascript:submit();" TARGET=_self />'."\n"; if (scalar(%$fullname) eq 0) { my $colspan=3+scalar(@parts); - $result='There are no students in section "'.$ENV{'form.section'}.'" with enrollment status "'.$ENV{'form.Status'}.'" to modify or grade.'; + $result='There are no students in section "'.$ENV{'form.section'}. + '" with enrollment status "'.$ENV{'form.Status'}.'" to modify or grade.'; } $result.=&show_grading_menu_form($symb,$url); return $result; @@ -2047,13 +2055,13 @@ sub viewstudentgrade { if ($status eq 'excused'); $result.=$optsel; $result.="\n"; - } else { - $result.=''. - "\n"; - $result.='Date/Time | '. 'Submission | '. 'Status | '; + my %responseType = (); + foreach my $partid (@{$parts}) { + $responseType{$partid} = $curRes->responseType($partid); + } my ($version); for ($version=1;$version<=$record{'version'};$version++) { my $timestamp = scalar(localtime($record{$version.':timestamp'})); @@ -2812,16 +2821,13 @@ sub displayPage { my @versionKeys = split(/\:/,$record{$version.':keys'}); my @displaySub = (); foreach my $partid (@{$parts}) { - my $responseType = $curRes->responseType($partid); my @matchKey = grep /^resource\.$partid\..*?\.submission$/,@versionKeys; next if ($record{"$version:resource.$partid.solved"} eq ''); -# next if ($record{"$version:resource.$partid.award"} eq 'APPROX_ANS' && -# $record{"$version:resource.$partid.solved"} eq ''); $displaySub[0].=(exists $record{$version.':'.$matchKey[0]}) ? - 'Part '.$partid.' Type:'.$responseType.':endtype'. + 'Part '.$partid.' '. ($record{"$version:resource.$partid.tries"} eq '' ? 'Trial not counted' : 'Trial '.$record{"$version:resource.$partid.tries"}).' '. - $record{$version.':'.$matchKey[0]}.'
Answer | '. + (join ' | ',@ans).' |
'.$grayFont.'Option ID | '.$grayFont. + (join ' | '.$grayFont,@IDs).' |
'."\n".
- '
|