--- loncom/interface/statistics/lonstathelpers.pm 2004/08/12 12:54:12 1.19 +++ loncom/interface/statistics/lonstathelpers.pm 2004/08/25 17:23:06 1.20 @@ -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 @@ sub get_prev_curr_next { 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},