[LON-CAPA-cvs] cvs: loncom /homework grades.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 14 Mar 2007 23:39:40 -0000


albertel		Wed Mar 14 19:39:40 2007 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - BUG#5067 - 'essay part only' wasn't highing non essay parts in multipart problems
  
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.392 loncom/homework/grades.pm:1.393
--- loncom/homework/grades.pm:1.392	Wed Mar 14 15:15:37 2007
+++ loncom/homework/grades.pm	Wed Mar 14 19:39:39 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.392 2007/03/14 19:15:37 albertel Exp $
+# $Id: grades.pm,v 1.393 2007/03/14 23:39:39 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1872,6 +1872,9 @@
 	    my %seenparts;
 	    my @part_response_id = &flatten_responseType($responseType);
 	    foreach my $part (@part_response_id) {
+		next if ($env{'form.lastSub'} eq 'hdgrade' 
+			 && $$handgrade{$$part[0].'_'.$$part[1]} ne 'yes');
+
 		my ($partid,$respid) = @{ $part };
 		my $display_part=&get_display_part($partid,$symb);
 		if ($env{"form.$uname:$udom:$partid:submitted_by"}) {
@@ -1918,8 +1921,8 @@
 			($env{'form.lastSub'} eq 'hdgrade' && 
 			 $$handgrade{$$part[0].'_'.$$part[1]} eq 'yes')) {
 			my $display_part=&get_display_part($partid,$symb);
-			$lastsubonly.='<tr><td bgcolor="#ffffe6"><b>Part:</b> '.
-			    $display_part.' <font color="#999999">( ID '.$respid.
+			$lastsubonly.='<tr><td bgcolor="#ffffe6">Debug -'.'<b>Part:</b> '.
+			    $display_part.' <font color="#999999">( hhhh ID '.$respid.
 			    ' )</font>&nbsp; &nbsp;';
 			my $files=&get_submitted_files($udom,$uname,$partid,$respid,\%record);
 			if (@$files) {
@@ -2012,7 +2015,8 @@
 	my $part_resp = join('_',@{ $part_response_id });
 	next if ($seen{$partid} > 0);
 	$seen{$partid}++;
-	next if ($$handgrade{$part_resp} =~ /:no$/ && $env{'form.lastSub'} =~ /^(hdgrade)$/);
+	next if ($$handgrade{$part_resp} ne 'yes' 
+		 && $env{'form.lastSub'} eq 'hdgrade');
 	push @partlist,$partid;
 	push @gradePartRespid,$partid.'.'.$respid;
 	$request->print(&gradeBox($request,$symb,$uname,$udom,$counter,$partid,\%record));