--- loncom/interface/statistics/lonstudentassessment.pm 2004/02/06 19:29:00 1.83 +++ loncom/interface/statistics/lonstudentassessment.pm 2004/02/10 16:47:25 1.84 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentassessment.pm,v 1.83 2004/02/06 19:29:00 matthew Exp $ +# $Id: lonstudentassessment.pm,v 1.84 2004/02/10 16:47:25 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1016,7 +1016,12 @@ END # Put the names of the problems and parts into the sheet my $count = 0; foreach my $res (@{$seq->{'contents'}}) { - next if ($res->{'type'} ne 'assessment'); + if ($res->{'type'} ne 'assessment' || + ! exists($res->{'parts'}) || + ref($res->{'parts'}) ne 'ARRAY' || + scalar(@{$res->{'parts'}}) < 1) { + next; + } if (scalar(@{$res->{'parts'}}) > 1) { foreach my $part (@{$res->{'parts'}}) { $excel_sheet->write($rows_output,