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

raeburn raeburn@source.lon-capa.org
Mon, 22 Dec 2008 15:13:45 -0000


raeburn		Mon Dec 22 15:13:45 2008 EDT

  Modified files:              (Branch: version_2_8_X)
    /loncom/homework	grades.pm 
  Log:
  - Backport 1.541.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.528.2.2 loncom/homework/grades.pm:1.528.2.3
--- loncom/homework/grades.pm:1.528.2.2	Thu Dec 18 13:19:17 2008
+++ loncom/homework/grades.pm	Mon Dec 22 15:13:45 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.528.2.2 2008/12/18 13:19:17 raeburn Exp $
+# $Id: grades.pm,v 1.528.2.3 2008/12/22 15:13:45 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7335,22 +7335,7 @@
     foreach my $resource (@resources) {
         my $symb = $resource->symb();
 
-        my (@parts,@allparts,@possible_parts);
-
-        # Need to retrieve part IDs and response IDs because essayresponse,
-        # reactionresponse and organicresponse items are not included in 
-        # $analysis{'parts'} from lonnet::ssi.  
-        if (ref($resource->parts()) eq 'ARRAY') {
-            foreach my $part (@{$resource->parts()}) {
-                if (!&Apache::loncommon::check_if_partid_hidden($part,$symb,$udom,$uname)) {
-                    my @resp_ids = $resource->responseIds($part);
-                    foreach my $id (@resp_ids) {
-                        my $part_id = $part.'.'.$id;
-                        push(@possible_parts,$part_id);
-                    }
-                }
-            }
-        }
+        my @parts;
 
         my $result=&ssi_with_retries($resource->src(), $ssi_retries,
                                         ('symb' => $symb,
@@ -7371,21 +7356,8 @@
                 }
             }
         }
-        # Add part_ids for any essayresponse, reactionresponse or 
-        # organicresponse items. 
-        foreach my $part_id (@possible_parts) {
-            if (grep(/^\Q$part_id\E$/,@parts)) {
-                push(@allparts,$part_id);
-            } else {
-                if (($analysis{$part_id.'.type'} eq 'essayresponse') ||
-                    ($analysis{$part_id.'.type'} eq 'reactionresponse') ||
-                    ($analysis{$part_id.'.type'} eq 'organicresponse')) {
-                    push(@allparts,$part_id);
-                }
-            }
-        }
 
-	foreach my $part_id (@allparts) {
+	foreach my $part_id (@parts) {
             my $lines;
 
 	    # TODO - make this a persistent hash not an array.