--- loncom/interface/statistics/lonproblemanalysis.pm 2004/10/29 16:39:42 1.101 +++ loncom/interface/statistics/lonproblemanalysis.pm 2004/12/03 21:53:59 1.107 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemanalysis.pm,v 1.101 2004/10/29 16:39:42 matthew Exp $ +# $Id: lonproblemanalysis.pm,v 1.107 2004/12/03 21:53:59 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,6 +38,7 @@ use Apache::lonstudentsubmissions(); use HTML::Entities(); use Time::Local(); use Spreadsheet::WriteExcel(); +use capa; my $plotcolors = ['#33ff00', '#0033cc', '#990000', '#aaaa66', '#663399', '#ff9933', @@ -85,8 +86,8 @@ sub BuildProblemAnalysisPage { # # Support for numerical and radio response isn't complete enough to # include in 1.2 release. - # my $problem_types = '(option|radiobutton|numerical)'; - my $problem_types = '.';#(option)'; + my $problem_types = '(option|radiobutton|numerical)'; + # my $problem_types = '.';#(option)'; if (exists($ENV{'form.problemchoice'}) && ! exists($ENV{'form.SelectAnother'})) { foreach my $button (@SubmitButtons) { @@ -152,19 +153,10 @@ sub BuildProblemAnalysisPage { $problem_data, \@Students); } elsif ($current_problem->{'resptype'} eq 'numerical') { - ## - ## 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, - $problem_data,\@Students); - } - } + &numerical_response_analysis($r,$current_problem, + $problem_data,\@Students); } else { - $r->print('
'. + &mt($no_data_message,$plot_num,@extra_data). + ' | |
'. + &mt($header_message,$plot_num,@extra_data). + ' | |
'. + &mt($stats_message, + $responses->{'_count'}, + $responses->{'_correct'}, + $responses->{'_count'}-$responses->{'_correct'}, + $responses->{'_students'}, + @extra_data). + ' | |
'. + &numerical_plot_percent($r,$responses).' | '. + ''. + &numerical_plot_differences($r,$responses).' | '. + '
'.$post_message.' |
'.&mt('Bar').' | '. + ''.&mt('Range').' | '. + ''.&mt('Incorrect').' | '. + ''.&mt('Correct').' | '. + ''.&mt('Count').' | '. + '||
---|---|---|---|---|---|---|
'.$labels->[$i].' | '. + ''.$lownum.' | '. + '- | '. + ''.$highnum.' | '. + ''.$incorrect->[$i].' | '. + ''.$correct->[$i].' | '. + ''.$count->[$i].' | '. + '
'.
- ''.$title.' (N='.$N.')'.
- ''.
+ ''.&mt('Distribution of correct answers').''.
+ ' '.&mt('[_1] students, [_2] distinct correct answers', + $n,scalar(keys(%$data))). + ' '.&mt('Maximum number of coinciding values: [_1]',$max_y). ' | ||||
'.$min.' | '. + ''.$min_x.' | '. ''.$plotresult.' | '. - ''.$max.' | '. + ''.$max_x.' | '. '
'. - 'Maximum Number of Coinciding Values: '.$max_y. - ' |