version 1.127, 2006/08/17 21:19:47
|
version 1.129, 2006/12/21 19:52:28
|
Line 144 sub BuildProblemAnalysisPage {
|
Line 144 sub BuildProblemAnalysisPage {
|
$r->print(&Apache::lonstathelpers::render_resource($resource)); |
$r->print(&Apache::lonstathelpers::render_resource($resource)); |
} |
} |
$r->rflush(); |
$r->rflush(); |
my %Data = &Apache::lonstathelpers::get_problem_data |
if (@Students) { |
($resource->src); |
my %Data = &Apache::lonstathelpers::get_problem_data |
my $problem_data = $Data{$current_problem->{'part'}. |
($resource->src); |
'.'. |
my $problem_data = $Data{$current_problem->{'part'}. |
$current_problem->{'respid'}}; |
'.'. |
if ($current_problem->{'resptype'} eq 'option') { |
$current_problem->{'respid'}}; |
&OptionResponseAnalysis($r,$current_problem, |
if ($current_problem->{'resptype'} eq 'option') { |
$problem_data, |
&OptionResponseAnalysis($r,$current_problem, |
\@Students); |
$problem_data, |
} elsif ($current_problem->{'resptype'} eq 'radiobutton') { |
\@Students); |
&radio_response_analysis($r,$current_problem, |
} elsif ($current_problem->{'resptype'} eq 'radiobutton') { |
$problem_data, |
&radio_response_analysis($r,$current_problem, |
\@Students); |
$problem_data, |
} elsif ($current_problem->{'resptype'} eq 'numerical') { |
\@Students); |
&numerical_response_analysis($r,$current_problem, |
} elsif ($current_problem->{'resptype'} eq 'numerical') { |
$problem_data,\@Students); |
&numerical_response_analysis($r,$current_problem, |
} else { |
$problem_data,\@Students); |
$r->print('<h2>Analysis of '.$current_problem->{'resptype'}.' is not supported</h2>'); |
} else { |
} |
$r->print('<h2>Analysis of '.$current_problem->{'resptype'}.' is not supported</h2>'); |
|
} |
|
} |
} |
} |
$r->print('<hr />'); |
$r->print('<hr />'); |
} else { |
} else { |
Line 327 sub numerical_plot_percent {
|
Line 329 sub numerical_plot_percent {
|
last; |
last; |
} |
} |
} |
} |
|
$percent_spread = $highest_percent - $lowest_percent; |
my $bin_size = 1; |
my $bin_size = 1; |
foreach (qw/0.01 0.05 0.1 0.5 1 2 5 10 20 25 50 100/) { |
foreach (qw/0.01 0.05 0.1 0.5 1 2 5 10 20 25 50 100/) { |
if ($lowest_percent/2 < $_){ |
if ($lowest_percent/2 < $_){ |
$bin_size = $_; |
$bin_size = $_; |
last; |
if ( ($percent_spread/$bin_size) < $max_bins ) { |
|
last; |
|
} |
} |
} |
} |
} |
my @bins; |
my @bins; |
Line 406 sub numerical_plot_differences {
|
Line 411 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) { |
|
$high_bin+=1; |
|
$low_bin-=1; |
|
} |
if (!$min_bin_size || |
if (!$min_bin_size || |
($high_bin -$low_bin)/$min_bin_size * 2 > $max_bins) { |
($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; |
Line 1835 sub CreateInterface {
|
Line 1844 sub CreateInterface {
|
$Str .= '<tr>'; |
$Str .= '<tr>'; |
$Str .= '<td align="center"><b>'.&mt('Sections').'</b></td>'; |
$Str .= '<td align="center"><b>'.&mt('Sections').'</b></td>'; |
$Str .= '<td align="center"><b>'.&mt('Groups').'</b></td>'; |
$Str .= '<td align="center"><b>'.&mt('Groups').'</b></td>'; |
$Str .= '<td align="center"><b>'.&mt('Enrollment Status').'</b></td>'; |
$Str .= '<td align="center"><b>'.&mt('Access Status').'</b></td>'; |
$Str .= '<td align="center"> </td>'; |
$Str .= '<td align="center"> </td>'; |
$Str .= '</tr>'."\n"; |
$Str .= '</tr>'."\n"; |
## |
## |