--- loncom/interface/statistics/lonproblemanalysis.pm 2004/03/11 20:11:18 1.77 +++ loncom/interface/statistics/lonproblemanalysis.pm 2004/04/01 15:32:06 1.84 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemanalysis.pm,v 1.77 2004/03/11 20:11:18 matthew Exp $ +# $Id: lonproblemanalysis.pm,v 1.84 2004/04/01 15:32:06 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -99,7 +99,7 @@ sub BuildProblemAnalysisPage { } $r->rflush(); # - my $problem_types = '(option|radiobutton)'; + my $problem_types = '(option|radiobutton|numerical)'; if (exists($ENV{'form.problemchoice'}) && ! exists($ENV{'form.SelectAnother'})) { foreach my $button (@SubmitButtons) { @@ -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('
'. + ''.$title.' (N='.$N.')'. + ''. + ' | ||
'.$min.' | '. + ''.$plotresult.' | '. + ''.$max.' | '. + '
'. + 'Maximum Number of Coinciding Values: '.$max_y. + ' |