--- loncom/interface/statistics/lonproblemanalysis.pm 2004/10/27 17:47:13 1.96 +++ loncom/interface/statistics/lonproblemanalysis.pm 2004/12/02 21:53:33 1.106 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemanalysis.pm,v 1.96 2004/10/27 17:47:13 matthew Exp $ +# $Id: lonproblemanalysis.pm,v 1.106 2004/12/02 21:53:33 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', @@ -148,23 +149,14 @@ sub BuildProblemAnalysisPage { $problem_data, \@Students); } elsif ($current_problem->{'resptype'} eq 'radiobutton') { - &RadioResponseAnalysis($r,$current_problem, - $problem_data, - \@Students); + &radio_response_analysis($r,$current_problem, + $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. - ' |
'. + ''. + &mt($pre_graph_text, + $plot_num,$foil_choice_data->{'_count'}, + $correct, + $foil_choice_data->{'_count'}-$correct, + $foil_choice_data->{'_students'}, + @extra_data). + ' | ||||||
'.$concept_plot.' | '. ''.$choice_plot.' | '; if ($stacked_plot ne '') { $analysis_html .= - ''.$stacked_plot.' | '. - ''.&build_foil_key($foils,$count_by_foil).' | '; + ''.$stacked_plot.' | '. + ''.&build_foil_key($foils,$count_by_foil).' | '; } else { $analysis_html .= (''x2); } $analysis_html.=' |
'. + $post_graph_text.' | ||||||
'.
+ &mt($no_data_text,
+ $plot_num,$foil_choice_data->{'_count'},
+ $correct,
+ $foil_choice_data->{'_count'}-$correct,
+ @extra_data);
+ if (defined($post_graph_text)) {
+ $analysis_html.=' '.$post_graph_text; + } + $analysis_html.=' |