version 1.26, 2003/10/07 16:07:39
|
version 1.27, 2003/10/08 19:20:47
|
Line 82 sub BuildProblemAnalysisPage {
|
Line 82 sub BuildProblemAnalysisPage {
|
} |
} |
$r->print('<hr />'); |
$r->print('<hr />'); |
} else { |
} else { |
$r->print('<h3>No Problem Selected</h3>'); |
$r->print('<h3>'.&mt('Please select a problem to analyze').'</h3>'); |
} |
} |
# Okay, they asked for data, so make sure we get the latest data. |
# Okay, they asked for data, so make sure we get the latest data. |
$r->print(&OptionResponseProblemSelector()); |
$r->print(&OptionResponseProblemSelector()); |
Line 150 sub DoTriesAnalysis {
|
Line 150 sub DoTriesAnalysis {
|
} |
} |
my @Data = ('<td></td>'); |
my @Data = ('<td></td>'); |
for (my $i=$mintries;$i<=$maxtries;$i++) { |
for (my $i=$mintries;$i<=$maxtries;$i++) { |
push(@Data,'<td colspan="3">'.&DrawGraph('Attempt '.$i,'Foil Number', |
my $minstu = $ResponseData{$Foils[0]}->[$i]->{'total'}; |
'Percent Correct',100, |
my $maxstu = $ResponseData{$Foils[0]}->[$i]->{'total'}; |
$PlotData[$i]->{'good'}, |
foreach my $foilid (@Foils) { |
$PlotData[$i]->{'bad'}).'</td>'); |
if ($minstu > $ResponseData{$foilid}->[$i]->{'total'}) { |
|
$minstu = $ResponseData{$foilid}->[$i]->{'total'}; |
|
} |
|
if ($maxstu < $ResponseData{$foilid}->[$i]->{'total'}) { |
|
$maxstu = $ResponseData{$foilid}->[$i]->{'total'}; |
|
} |
|
} |
|
my $graphlink; |
|
if ($maxstu == $minstu) { |
|
$graphlink = &DrawGraph('Attempt '.$i.', '.$maxstu.' students', |
|
'Foil Number', |
|
'Percent Correct', |
|
100, |
|
$PlotData[$i]->{'good'}, |
|
$PlotData[$i]->{'bad'}); |
|
} else { |
|
$graphlink = &DrawGraph('Attempt '.$i.', '.$minstu.'-'.$maxstu. |
|
' students', |
|
'Foil Number', |
|
'Percent Correct', |
|
100, |
|
$PlotData[$i]->{'good'}, |
|
$PlotData[$i]->{'bad'}); |
|
} |
|
push(@Data,'<td colspan="3">'.$graphlink.'</td>'); |
} |
} |
push (@Rows,\@Data); |
push (@Rows,\@Data); |
my $table = '<table border="1" >'."\n"; |
my $table = '<table border="1" >'."\n"; |
Line 193 sub analyze_option_data_by_tries {
|
Line 217 sub analyze_option_data_by_tries {
|
! exists($tryhash->{'incorrect'})) || |
! exists($tryhash->{'incorrect'})) || |
($tryhash->{'correct'} < 1 && |
($tryhash->{'correct'} < 1 && |
$tryhash->{'incorrect'} < 1)); |
$tryhash->{'incorrect'} < 1)); |
|
$tryhash->{'total'} = $tryhash->{'correct'} + |
|
$tryhash->{'incorrect'}; |
$tryhash->{'percent_corr'} = 100 * |
$tryhash->{'percent_corr'} = 100 * |
($tryhash->{'correct'} / |
($tryhash->{'correct'} / |
($tryhash->{'correct'} + $tryhash->{'incorrect'}) |
($tryhash->{'correct'} + $tryhash->{'incorrect'}) |