'.
''.
&mt($pre_graph_text,
$plot_num,$foil_choice_data->{'_count'},
$correct,
- $foil_choice_data->{'_count'}-$correct,
+ $incorrect,
$foil_choice_data->{'_students'},
@extra_data).
' |
'.$/;
@@ -936,7 +974,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;
}
}
@@ -1174,6 +1212,7 @@ sub OptionResponseAnalysis {
# Note: part data is not needed.
my $PerformanceData = &Apache::loncoursedata::get_response_data
([&Apache::lonstatistics::get_selected_sections()],
+ [&Apache::lonstatistics::get_selected_groups()],
$Apache::lonstatistics::enrollment_status,
$resource->symb,$respid);
if (! defined($PerformanceData) ||
@@ -1183,13 +1222,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);
@@ -1211,7 +1250,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 = [];
@@ -1309,7 +1348,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}));
@@ -1421,7 +1460,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;
@@ -1472,6 +1511,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',
@@ -1803,18 +1843,18 @@ 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
my $Str = '';
- $Str .= &Apache::lonhtmlcommon::breadcrumbs
- (undef,'Detailed Problem Analysis');
+ $Str .= &Apache::lonhtmlcommon::breadcrumbs('Detailed Problem Analysis');
$Str .= ''."\n";
$Str .= '';
$Str .= ''.&mt('Sections').' | ';
- $Str .= ''.&mt('Enrollment Status').' | ';
+ $Str .= ''.&mt('Groups').' | ';
+ $Str .= ''.&mt('Access Status').' | ';
$Str .= ' | ';
$Str .= ' '."\n";
##
@@ -1823,6 +1863,10 @@ sub CreateInterface {
$Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);
$Str .= '';
#
+ $Str .= ''."\n";
+ $Str .= &Apache::lonstatistics::GroupSelect('Group','multiple',5);
+ $Str .= ' | ';
+ #
$Str .= '';
$Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);
$Str .= ' | ';
@@ -1833,7 +1877,7 @@ sub CreateInterface {
##
my $showprob_checkbox =
'';
@@ -1843,14 +1887,14 @@ sub CreateInterface {
##
my $analyze_selector = '';
$Str .= ' '.$/;
##
my $numplots_selector = ' ';
@@ -1915,7 +1959,7 @@ sub hashify_attempt {
my %attempt;
$attempt{'student'} = $row->[&Apache::loncoursedata::RD_sname()];
$attempt{'tries'} = $row->[&Apache::loncoursedata::RD_tries()];
- $attempt{'submission'} = &Apache::lonnet::unescape($row->[&Apache::loncoursedata::RD_submission()]);
+ $attempt{'submission'} = &unescape($row->[&Apache::loncoursedata::RD_submission()]);
$attempt{'award'} = $row->[&Apache::loncoursedata::RD_awarddetail()];
$attempt{'timestamp'} = $row->[&Apache::loncoursedata::RD_timestamp()];
return %attempt;
@@ -1939,12 +1983,12 @@ sub Process_OR_Row {
my @Foilsubs = split('&',$submission);
for (my $j=0;$j<=$#Foilgrades;$j++) {
my ($foilid,$correct) = split('=',$Foilgrades[$j]);
- $foilid = &Apache::lonnet::unescape($foilid);
+ $foilid = &unescape($foilid);
my (undef,$submission) = split('=',$Foilsubs[$j]);
if ($correct) {
$RowData{$foilid}->{'_correct'}++;
} else {
- $submission = &Apache::lonnet::unescape($submission);
+ $submission = &unescape($submission);
$RowData{$foilid}->{$submission}++;
}
$RowData{$foilid}->{'_total'}++;
|