[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstathelpers.pm

matthew lon-capa-cvs@mail.lon-capa.org
Wed, 25 Aug 2004 17:23:07 -0000


matthew		Wed Aug 25 13:23:07 2004 EDT

  Modified files:              
    /loncom/interface/statistics	lonstathelpers.pm 
  Log:
  Modified get_prev_curr_next to work with surveys.  Needed for 1.2
  
  
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.19 loncom/interface/statistics/lonstathelpers.pm:1.20
--- loncom/interface/statistics/lonstathelpers.pm:1.19	Thu Aug 12 08:54:12 2004
+++ loncom/interface/statistics/lonstathelpers.pm	Wed Aug 25 13:23:06 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstathelpers.pm,v 1.19 2004/08/12 12:54:12 matthew Exp $
+# $Id: lonstathelpers.pm,v 1.20 2004/08/25 17:23:06 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -261,14 +261,12 @@
             next if ($res->{'type'} ne 'assessment');
             foreach my $part (@{$res->{'parts'}}) {
                 my $partdata = $res->{'partdata'}->{$part};
-                if ($partdata->{'Survey'}) {
-                    if ($granularity eq 'part_survey'){
-                        push (@Resource,
-                              { symb     => $res->{symb},
-                                part     => $part,
-                                resource => $res,
-                            } );
-                    }
+                if ($partdata->{'Survey'} && ($granularity eq 'part_survey')){
+                    push (@Resource,
+                          { symb     => $res->{symb},
+                            part     => $part,
+                            resource => $res,
+                        } );
                 } elsif ($granularity eq 'part') {
                     push (@Resource,
                           { symb     => $res->{symb},