version 1.117, 2005/03/11 21:14:41
|
version 1.119, 2005/03/15 00:51:43
|
Line 132 sub BuildProblemAnalysisPage {
|
Line 132 sub BuildProblemAnalysisPage {
|
my $resource = $current_problem->{'resource'}; |
my $resource = $current_problem->{'resource'}; |
$r->print('<h1>'.$resource->compTitle.'</h1>'); |
$r->print('<h1>'.$resource->compTitle.'</h1>'); |
$r->print('<h3>'.$resource->src.'</h3>'); |
$r->print('<h3>'.$resource->src.'</h3>'); |
|
$r->print('<h4>'.&Apache::lonstatistics::section_and_enrollment_description().'</h4>'); |
if ($ENV{'form.show_prob'} eq 'true') { |
if ($ENV{'form.show_prob'} eq 'true') { |
$r->print(&Apache::lonstathelpers::render_resource($resource)); |
$r->print(&Apache::lonstathelpers::render_resource($resource)); |
} |
} |
Line 186 sub numerical_response_analysis {
|
Line 187 sub numerical_response_analysis {
|
$problem->{'respid'}); |
$problem->{'respid'}); |
# Gather student data |
# Gather student data |
my $response_data = &Apache::loncoursedata::get_response_data |
my $response_data = &Apache::loncoursedata::get_response_data |
(\@Apache::lonstatistics::SelectedSections, |
([&Apache::lonstatistics::get_selected_sections()], |
$Apache::lonstatistics::enrollment_status, |
$Apache::lonstatistics::enrollment_status, |
$resource->symb,$respid); |
$resource->symb,$respid); |
# |
# |
Line 481 sub numerical_classify_responses {
|
Line 482 sub numerical_classify_responses {
|
if ($stats{'max_abs'} < $abs_high) { |
if ($stats{'max_abs'} < $abs_high) { |
$stats{'max_abs'} = $abs_high; |
$stats{'max_abs'} = $abs_high; |
} |
} |
my $low_percent = 100 * abs($abs_low / $subm{'correct'}); |
my $low_percent; |
my $high_percent = 100 * abs($abs_high / $subm{'correct'}); |
my $high_percent; |
|
if (defined($subm{'correct'}) && $subm{'correct'} != 0) { |
|
$low_percent = 100 * abs($abs_low / $subm{'correct'}); |
|
$high_percent = 100 * abs($abs_high / $subm{'correct'}); |
|
} |
if (! defined($stats{'min_percent'}) || |
if (! defined($stats{'min_percent'}) || |
$stats{'min_percent'} > $low_percent) { |
$stats{'min_percent'} > $low_percent) { |
$stats{'min_percent'} = $low_percent; |
$stats{'min_percent'} = $low_percent; |
Line 530 sub numerical_classify_responses {
|
Line 535 sub numerical_classify_responses {
|
} |
} |
} |
} |
} |
} |
|
$stats{'correct_count'} |= 0; |
|
$stats{'incorrect_count'} |= 0; |
$stats{'students'}=scalar(keys(%students)); |
$stats{'students'}=scalar(keys(%students)); |
return (\%submission_data,\%stats); |
return (\%submission_data,\%stats); |
} |
} |
Line 765 sub radio_response_analysis {
|
Line 772 sub radio_response_analysis {
|
$analysis_html .= $table; |
$analysis_html .= $table; |
# Gather student data |
# Gather student data |
my $response_data = &Apache::loncoursedata::get_response_data |
my $response_data = &Apache::loncoursedata::get_response_data |
(\@Apache::lonstatistics::SelectedSections, |
([&Apache::lonstatistics::get_selected_sections()], |
$Apache::lonstatistics::enrollment_status, |
$Apache::lonstatistics::enrollment_status, |
$resource->symb,$respid); |
$resource->symb,$respid); |
my $correct; # either a hash reference or a scalar |
my $correct; # either a hash reference or a scalar |
Line 881 sub radio_response_analysis {
|
Line 888 sub radio_response_analysis {
|
$choice_plot ne '' || |
$choice_plot ne '' || |
$stacked_plot ne '') { |
$stacked_plot ne '') { |
my $correct = $foil_choice_data->{'_correct'}; |
my $correct = $foil_choice_data->{'_correct'}; |
if (! defined($correct) || $correct eq '') { |
$correct |= 0; |
$correct = 0; |
my $incorrect = $foil_choice_data->{'_count'}-$correct; |
} |
|
my $incorrect = |
|
$analysis_html.= '<tr><td colspan="4" align="center">'. |
$analysis_html.= '<tr><td colspan="4" align="center">'. |
'<font size="+1">'. |
'<font size="+1">'. |
&mt($pre_graph_text, |
&mt($pre_graph_text, |
$plot_num,$foil_choice_data->{'_count'}, |
$plot_num,$foil_choice_data->{'_count'}, |
$correct, |
$correct, |
$foil_choice_data->{'_count'}-$correct, |
$incorrect, |
$foil_choice_data->{'_students'}, |
$foil_choice_data->{'_students'}, |
@extra_data). |
@extra_data). |
'</td></tr>'.$/; |
'</td></tr>'.$/; |
Line 1172 sub OptionResponseAnalysis {
|
Line 1177 sub OptionResponseAnalysis {
|
$problem->{'respid'}); |
$problem->{'respid'}); |
# Note: part data is not needed. |
# Note: part data is not needed. |
my $PerformanceData = &Apache::loncoursedata::get_response_data |
my $PerformanceData = &Apache::loncoursedata::get_response_data |
(\@Apache::lonstatistics::SelectedSections, |
([&Apache::lonstatistics::get_selected_sections()], |
$Apache::lonstatistics::enrollment_status, |
$Apache::lonstatistics::enrollment_status, |
$resource->symb,$respid); |
$resource->symb,$respid); |
if (! defined($PerformanceData) || |
if (! defined($PerformanceData) || |
Line 1308 sub OR_tries_analysis {
|
Line 1313 sub OR_tries_analysis {
|
# Create Foil Plots |
# Create Foil Plots |
my $data_count = $response_data{'_total'}->[$try]; |
my $data_count = $response_data{'_total'}->[$try]; |
my $correct = $response_data{'_correct'}->[$try]; |
my $correct = $response_data{'_correct'}->[$try]; |
if (! defined($correct)) { $correct = 0; } |
$correct |= 0; |
my @Datasets; |
my @Datasets; |
foreach my $option ('_correct',@{$ORdata->{'_Options'}}) { |
foreach my $option ('_correct',@{$ORdata->{'_Options'}}) { |
next if (! exists($foil_plot[$try]->{$option})); |
next if (! exists($foil_plot[$try]->{$option})); |
Line 1471 sub OR_time_analysis {
|
Line 1476 sub OR_time_analysis {
|
## |
## |
my ($processed_time_data,$correct,$data_count,$student_count) = |
my ($processed_time_data,$correct,$data_count,$student_count) = |
&OR_time_process_data($performance_data,$begin_index,$end_index); |
&OR_time_process_data($performance_data,$begin_index,$end_index); |
|
$correct |= 0; |
## |
## |
$table .= '<tr><td colspan="4" align="center"><font size="+1">'. |
$table .= '<tr><td colspan="4" align="center"><font size="+1">'. |
&mt('[_1] submissions from [_2] students, [_3] correct, [_4] incorrect', |
&mt('[_1] submissions from [_2] students, [_3] correct, [_4] incorrect', |