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

ng lon-capa-cvs@mail.lon-capa.org
Mon, 14 Jul 2003 16:11:19 -0000


ng		Mon Jul 14 12:11:19 2003 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  show response type for jeremy to debug.
  
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.114 loncom/homework/grades.pm:1.115
--- loncom/homework/grades.pm:1.114	Mon Jul 14 10:43:39 2003
+++ loncom/homework/grades.pm	Mon Jul 14 12:11:19 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.114 2003/07/14 14:43:39 bowersj2 Exp $
+# $Id: grades.pm,v 1.115 2003/07/14 16:11:19 ng Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2662,8 +2662,6 @@
     my ($request) = @_;
     my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',
 						  $ENV{'request.course.fn'}.'_parms.db',1, 1);
-
-    #my $res = $navmap->firstResource(); # temp resource to access constants
     $navmap->init();
 
     # End navmap using boilerplate
@@ -2814,12 +2812,13 @@
 			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]}) ? 
-				'<b>Part&nbsp;'.$partid.'&nbsp;'.
+				'<b>Part&nbsp;'.$partid.'&nbsp;Type:'.$responseType.':endtype'.
 				($record{"$version:resource.$partid.tries"} eq '' ? 'Trial&nbsp;not&nbsp;counted' :
 				'Trial&nbsp;'.$record{"$version:resource.$partid.tries"}).'</b>&nbsp; '.
 				$record{$version.':'.$matchKey[0]}.'<br />' : '';