'.
''.
&mt($pre_graph_text,
$plot_num,$foil_choice_data->{'_count'},
$correct,
- $foil_choice_data->{'_count'}-$correct,
+ $incorrect,
$foil_choice_data->{'_students'},
@extra_data).
' |
'.$/;
@@ -935,7 +949,7 @@ sub ensure_start_end_times {
(localtime($last - $sec_in_day*($plot_num-1)))[3..5];
$start = &Time::Local::timelocal(0,0,0,$sday,$smon,$syear);
$end = $start + $sec_in_day;
- if ($plot_num == $ENV{'form.NumPlots'}) {
+ if ($plot_num == $env{'form.NumPlots'}) {
$start = $first;
}
}
@@ -1172,7 +1186,7 @@ sub OptionResponseAnalysis {
$problem->{'respid'});
# Note: part data is not needed.
my $PerformanceData = &Apache::loncoursedata::get_response_data
- (\@Apache::lonstatistics::SelectedSections,
+ ([&Apache::lonstatistics::get_selected_sections()],
$Apache::lonstatistics::enrollment_status,
$resource->symb,$respid);
if (! defined($PerformanceData) ||
@@ -1182,13 +1196,13 @@ sub OptionResponseAnalysis {
'');
} else {
$r->rflush();
- if ($ENV{'form.AnalyzeOver'} eq 'tries') {
+ if ($env{'form.AnalyzeOver'} eq 'tries') {
my $analysis_html = &OR_tries_analysis($r,
$PerformanceData,
$problem_data);
$r->print($analysis_html);
$r->rflush();
- } elsif ($ENV{'form.AnalyzeOver'} eq 'time') {
+ } elsif ($env{'form.AnalyzeOver'} eq 'time') {
my $analysis_html = &OR_time_analysis($PerformanceData,
$problem_data);
$r->print($analysis_html);
@@ -1210,7 +1224,7 @@ sub OptionResponseAnalysis {
sub OR_tries_analysis {
my ($r,$PerformanceData,$ORdata) = @_;
my $mintries = 1;
- my $maxtries = $ENV{'form.NumPlots'};
+ my $maxtries = $env{'form.NumPlots'};
my ($table,$Foils,$Concepts) = &build_foil_index($ORdata);
if (! defined($Concepts)) {
$Concepts = [];
@@ -1308,7 +1322,7 @@ sub OR_tries_analysis {
# Create Foil Plots
my $data_count = $response_data{'_total'}->[$try];
my $correct = $response_data{'_correct'}->[$try];
- if (! defined($correct)) { $correct = 0; }
+ $correct |= 0;
my @Datasets;
foreach my $option ('_correct',@{$ORdata->{'_Options'}}) {
next if (! exists($foil_plot[$try]->{$option}));
@@ -1420,7 +1434,7 @@ sub OR_time_analysis {
''.$table;
}
#
- my $num_plots = $ENV{'form.NumPlots'};
+ my $num_plots = $env{'form.NumPlots'};
my $num_data = scalar(@$performance_data)-1;
#
my $current_index;
@@ -1471,6 +1485,7 @@ sub OR_time_analysis {
##
my ($processed_time_data,$correct,$data_count,$student_count) =
&OR_time_process_data($performance_data,$begin_index,$end_index);
+ $correct |= 0;
##
$table .= ''.
&mt('[_1] submissions from [_2] students, [_3] correct, [_4] incorrect',
@@ -1802,8 +1817,8 @@ sub build_foil_key {
sub CreateInterface {
##
## Environment variable initialization
- if (! exists$ENV{'form.AnalyzeOver'}) {
- $ENV{'form.AnalyzeOver'} = 'tries';
+ if (! exists($env{'form.AnalyzeOver'})) {
+ $env{'form.AnalyzeOver'} = 'tries';
}
##
## Build the menu
@@ -1832,7 +1847,7 @@ sub CreateInterface {
##
my $showprob_checkbox =
'';
@@ -1842,14 +1857,14 @@ sub CreateInterface {
##
my $analyze_selector = '';
$Str .= ' '.$/;
##
my $numplots_selector = ' ';
|