--- loncom/interface/statistics/lonproblemanalysis.pm 2005/04/07 06:56:24 1.120 +++ loncom/interface/statistics/lonproblemanalysis.pm 2006/01/22 04:10:04 1.123 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemanalysis.pm,v 1.120 2005/04/07 06:56:24 albertel Exp $ +# $Id: lonproblemanalysis.pm,v 1.123 2006/01/22 04:10:04 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -97,8 +97,11 @@ sub BuildProblemAnalysisPage { $r->print($html.(' 'x5)); } # - $r->print(&Apache::lonstathelpers::submission_report_form - ('problem_analysis')); + + # This is commented out pending actual implementation of + # CSV and Excel output. + #$r->print(&Apache::lonstathelpers::submission_report_form + # ('problem_analysis')); # $r->print('
'); $r->rflush(); @@ -159,11 +162,14 @@ sub BuildProblemAnalysisPage { } $r->print('
'); } else { - $r->print(''); + my $submit_button = ''; + $r->print($submit_button); $r->print(' 'x5); $r->print('

'.&mt('Please select a problem to analyze').'

'); - $r->print(&Apache::lonstathelpers::problem_selector($problem_types)); + $r->print(&Apache::lonstathelpers::problem_selector($problem_types, + $submit_button)); } } @@ -338,7 +344,9 @@ sub numerical_plot_percent { while (my ($ans,$submissions) = each(%$responses)) { while (my ($submission,$counts) = each(%$submissions)) { my ($correct_count,$incorrect_count) = @$counts; - my $scaled_value = 100*($submission-$ans)/abs($ans); + my $scaled_value = + ($ans) ? 100*($submission-$ans)/abs($ans) + : 0; if ($scaled_value < $bins[0]) { $bins[0]=$scaled_value -1; }