version 1.120, 2005/04/07 06:56:24
|
version 1.125, 2006/05/01 19:29:13
|
Line 97 sub BuildProblemAnalysisPage {
|
Line 97 sub BuildProblemAnalysisPage {
|
$r->print($html.(' 'x5)); |
$r->print($html.(' 'x5)); |
} |
} |
# |
# |
$r->print(&Apache::lonstathelpers::submission_report_form |
|
('problem_analysis')); |
# This is commented out pending actual implementation of |
|
# CSV and Excel output. |
|
#$r->print(&Apache::lonstathelpers::submission_report_form |
|
# ('problem_analysis')); |
# |
# |
$r->print('<hr />'); |
$r->print('<hr />'); |
$r->rflush(); |
$r->rflush(); |
Line 159 sub BuildProblemAnalysisPage {
|
Line 162 sub BuildProblemAnalysisPage {
|
} |
} |
$r->print('<hr />'); |
$r->print('<hr />'); |
} else { |
} else { |
$r->print('<input type="submit" name="ProblemAnalysis" value="'. |
my $submit_button = '<input type="submit" '. |
&mt('Analyze Problem').'" />'); |
'name="ProblemAnalysis" value="'. |
|
&mt('Analyze Problem').'" />'; |
|
$r->print($submit_button); |
$r->print(' 'x5); |
$r->print(' 'x5); |
$r->print('<h3>'.&mt('Please select a problem to analyze').'</h3>'); |
$r->print('<h3>'.&mt('Please select a problem to analyze').'</h3>'); |
$r->print(&Apache::lonstathelpers::problem_selector($problem_types)); |
$r->print(&Apache::lonstathelpers::problem_selector($problem_types, |
|
$submit_button)); |
} |
} |
} |
} |
|
|
Line 338 sub numerical_plot_percent {
|
Line 344 sub numerical_plot_percent {
|
while (my ($ans,$submissions) = each(%$responses)) { |
while (my ($ans,$submissions) = each(%$responses)) { |
while (my ($submission,$counts) = each(%$submissions)) { |
while (my ($submission,$counts) = each(%$submissions)) { |
my ($correct_count,$incorrect_count) = @$counts; |
my ($correct_count,$incorrect_count) = @$counts; |
my $scaled_value = 100*($submission-$ans)/abs($ans); |
my $scaled_value = |
|
($ans) ? 100*($submission-$ans)/abs($ans) |
|
: 0; |
if ($scaled_value < $bins[0]) { |
if ($scaled_value < $bins[0]) { |
$bins[0]=$scaled_value -1; |
$bins[0]=$scaled_value -1; |
} |
} |
Line 393 sub numerical_plot_differences {
|
Line 401 sub numerical_plot_differences {
|
} elsif ($low_bin < 0 && $high_bin < -$low_bin) { |
} elsif ($low_bin < 0 && $high_bin < -$low_bin) { |
$high_bin = -$low_bin; |
$high_bin = -$low_bin; |
} |
} |
if (($high_bin -$low_bin)/$min_bin_size * 2 > $max_bins) { |
if (!$min_bin_size || |
|
($high_bin -$low_bin)/$min_bin_size * 2 > $max_bins) { |
$min_bin_size = abs($high_bin - $low_bin) / $max_bins * 2; |
$min_bin_size = abs($high_bin - $low_bin) / $max_bins * 2; |
} |
} |
my @bins; |
my @bins; |
Line 1814 sub CreateInterface {
|
Line 1823 sub CreateInterface {
|
## |
## |
## Build the menu |
## Build the menu |
my $Str = ''; |
my $Str = ''; |
$Str .= &Apache::lonhtmlcommon::breadcrumbs |
$Str .= &Apache::lonhtmlcommon::breadcrumbs('Detailed Problem Analysis'); |
(undef,'Detailed Problem Analysis'); |
|
$Str .= '<table cellspacing="5">'."\n"; |
$Str .= '<table cellspacing="5">'."\n"; |
$Str .= '<tr>'; |
$Str .= '<tr>'; |
$Str .= '<td align="center"><b>'.&mt('Sections').'</b></td>'; |
$Str .= '<td align="center"><b>'.&mt('Sections').'</b></td>'; |