--- loncom/interface/statistics/lonproblemstatistics.pm 2005/03/03 18:56:26 1.98 +++ loncom/interface/statistics/lonproblemstatistics.pm 2005/03/04 04:36:35 1.99 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemstatistics.pm,v 1.98 2005/03/03 18:56:26 matthew Exp $ +# $Id: lonproblemstatistics.pm,v 1.99 2005/03/04 04:36:35 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -713,6 +713,13 @@ sub BuildProblemStatisticsPage { # it does not slow things down noticably. &Apache::loncoursedata::populate_weight_table(); # + ($navmap,@sequences) = + &Apache::lonstatistics::selected_sequences_with_assessments(); + if (! ref($navmap)) { + $r->print('

'.&mt('A course-wide error occured.').'

'. + '

'.$navmap.'

'); + return; + } if (exists($ENV{'form.Excel'})) { &Excel_output($r); } else { @@ -720,13 +727,6 @@ sub BuildProblemStatisticsPage { &mt('Produce Excel Output').'" />'.' 'x5); $r->rflush(); my $count = 0; - ($navmap,@sequences) = - &Apache::lonstatistics::selected_sequences_with_assessments(); - if (! ref($navmap)) { - $r->print('

'.&mt('A course-wide error occured.').'

'. - '

'.$navmap.'

'); - return; - } foreach my $seq (@sequences) { my @resources = &Apache::lonstathelpers::get_resources($navmap,$seq);