--- loncom/interface/statistics/lonproblemanalysis.pm 2004/03/12 20:29:48 1.78 +++ loncom/interface/statistics/lonproblemanalysis.pm 2004/03/31 05:24:00 1.83 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemanalysis.pm,v 1.78 2004/03/12 20:29:48 matthew Exp $ +# $Id: lonproblemanalysis.pm,v 1.83 2004/03/31 05:24:00 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -160,13 +160,17 @@ sub BuildProblemAnalysisPage { $ProblemData, \@Students); } elsif ($current_problem->{'resptype'} eq 'numerical') { -# if (exists($ENV{'form.ExcelOutput'})) { -# &Apache::lonstudentsubmissions::prepare_excel_output -# ($r,$current_problem,$ProblemData,\@Students); -# } else { - &NumericalResponseAnalysis($r,$current_problem, - $ProblemData,\@Students); -# } + ## + ## analyze all responses of a problem at once + my $res = $current_problem->{'resource'}; + foreach my $partid (@{$res->{'parts'}}) { + $current_problem->{'part'} = $partid; + foreach my $respid (@{$res->{'partdata'}->{$partid}->{'ResponseIds'}}) { + $current_problem->{'respid'}=$respid; + &NumericalResponseAnalysis($r,$current_problem, + $ProblemData,\@Students); + } + } } else { $r->print('