version 1.91, 2004/10/04 19:10:26
|
version 1.93, 2004/10/05 14:03:45
|
Line 619 sub OR_tries_analysis {
|
Line 619 sub OR_tries_analysis {
|
foreach my $foilid (@{$concept->{'foils'}}) { |
foreach my $foilid (@{$concept->{'foils'}}) { |
for (my $try=$mintries;$try<=$maxtries;$try++) { |
for (my $try=$mintries;$try<=$maxtries;$try++) { |
# concept analysis data |
# concept analysis data |
$concept_data[$j]->{'_correct'} += |
$concept_data[$j]->[$try]->{'_correct'} += |
$response_data{$foilid}->[$try]->{'_correct'}; |
$response_data{$foilid}->[$try]->{'_correct'}; |
$concept_data[$j]->{'_total'} += |
$concept_data[$j]->[$try]->{'_total'} += |
$response_data{$foilid}->[$try]->{'_total'}; |
$response_data{$foilid}->[$try]->{'_total'}; |
# |
# |
# foil analysis data |
# foil analysis data |
Line 663 sub OR_tries_analysis {
|
Line 663 sub OR_tries_analysis {
|
if (defined($Concepts)) { $num_concepts = scalar(@$Concepts); } |
if (defined($Concepts)) { $num_concepts = scalar(@$Concepts); } |
# |
# |
for (my $try=$mintries;$try<=$maxtries;$try++) { |
for (my $try=$mintries;$try<=$maxtries;$try++) { |
|
if (! defined($response_data{'_total'}->[$try]) || |
|
$response_data{'_total'}->[$try] == 0) { |
|
if ($try > 1) { |
|
$analysis_html.= '<tr><td align="center" colspan="4"><b>'. |
|
&mt('None of the selected students attempted the problem more than [_1] times.',$try-1). |
|
'</b></td></tr>'; |
|
} else { |
|
$analysis_html.= '<tr><td colspan="4" align="center"><b>'. |
|
&mt('None of the selected students have attempted the problem').'</b></td></tr>'; |
|
} |
|
last; |
|
} |
my $concept_graph=''; |
my $concept_graph=''; |
if ($num_concepts > 1) { |
if ($num_concepts > 1) { |
# |
# |
# Create concept plot |
# Create concept plot |
my @concept_plot_data; |
my @concept_plot_data; |
for (my $j=0;$j<=$#concept_data;$j++) { |
for (my $j=0;$j<=$#concept_data;$j++) { |
my $total = $concept_data[$j]->{'_total'}; |
my $total = $concept_data[$j]->[$try]->{'_total'}; |
if ($total == 0) { |
if ($total == 0) { |
$concept_plot_data[$j] = 0; |
$concept_plot_data[$j] = 0; |
} else { |
} else { |
$concept_plot_data[$j] = 100 * |
$concept_plot_data[$j] = 100 * |
sprintf('%0.3f', |
sprintf('%0.3f', |
$concept_data[$j]->{'_correct'} / $total); |
$concept_data[$j]->[$try]->{'_correct'} / |
|
$total); |
} |
} |
} |
} |
# |
# |