--- loncom/interface/statistics/loncorrectproblemplot.pm 2005/03/07 20:12:08 1.16
+++ loncom/interface/statistics/loncorrectproblemplot.pm 2006/12/31 22:43:48 1.22
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncorrectproblemplot.pm,v 1.16 2005/03/07 20:12:08 matthew Exp $
+# $Id: loncorrectproblemplot.pm,v 1.22 2006/12/31 22:43:48 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -28,7 +28,7 @@
package Apache::loncorrectproblemplot;
use strict;
-use Apache::lonnet();
+use Apache::lonnet;
use Apache::loncommon();
use Apache::lonhtmlcommon();
use Apache::loncoursedata();
@@ -59,7 +59,8 @@ sub BuildCorrectProblemsPage {
my ($r,$c)=@_;
#
my %Saveable_Parameters = ('Status' => 'scalar',
- 'Section' => 'array');
+ 'Section' => 'array',
+ 'Groups' => 'array');
&Apache::loncommon::store_course_settings('correct_problems_plot',
\%Saveable_Parameters);
&Apache::loncommon::restore_course_settings('correct_problems_plot',
@@ -73,7 +74,7 @@ sub BuildCorrectProblemsPage {
#
if (@Students < 1) {
$r->print('
'.
- &mt('There are no students in the sections selected').
+ &mt('There are no students in the sections/groups selected').
'
');
}
#
@@ -90,7 +91,7 @@ sub BuildCorrectProblemsPage {
$r->rflush();
#
# Determine which problem symbs we are to sum over
- if (exists($ENV{'form.CreatePlot'})) {
+ if (exists($env{'form.CreatePlot'})) {
my @ProblemSymbs;
my $total_weights = 0;
my $title = '';
@@ -122,6 +123,9 @@ sub BuildCorrectProblemsPage {
}
}
}
+ $r->print(''.
+ &Apache::lonstatistics::section_and_enrollment_description().
+ '
');
my ($starttime,$endtime) = &Apache::lonstathelpers::get_time_limits();
if (defined($starttime) || defined($endtime)) {
# Inform the user what the time limits on the data are.
@@ -131,7 +135,8 @@ sub BuildCorrectProblemsPage {
}
&Apache::loncoursedata::populate_weight_table();
my $score_data = &Apache::loncoursedata::get_student_scores
- (\@Apache::lonstatistics::SelectedSections,
+ ([&Apache::lonstatistics::get_selected_sections()],
+ [&Apache::lonstatistics::get_selected_groups()],
\@ProblemSymbs,
$Apache::lonstatistics::enrollment_status,undef,
$starttime,$endtime);
@@ -243,7 +248,7 @@ sub bin_data {
my @Bins;
my $count=0;
my $idx=0;
- while ($idx < scalar(@$data) && ($endbin-$binend + $binsize)>0) {
+ while ($idx < scalar(@$data) && ($endbin-$binend + $binsize)>=0) {
my $dataset = $data->[$idx++];
my ($x,$y) = @{$dataset};
while ($x > ($binend-.001)) {
@@ -285,13 +290,14 @@ sub CreateInterface {
##
## Environment variable initialization
my $Str;
- $Str .= &Apache::lonhtmlcommon::breadcrumbs(undef,'Correct Problems Plot');
+ $Str .= &Apache::lonhtmlcommon::breadcrumbs('Correct Problems Plot');
$Str .= '';
#
$Str .= '
'."\n";
$Str .= '';
$Str .= ''.&mt('Sections').' | ';
- $Str .= ''.&mt('Enrollment Status').' | ';
+ $Str .= ''.&mt('Groups').' | ';
+ $Str .= ''.&mt('Access Status').' | ';
$Str .= ''.&mt('Sequences and Folders').' | ';
$Str .= ''.
&Apache::lonstathelpers::limit_by_time_form().' | ';
@@ -301,6 +307,9 @@ 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 .= ' | '."\n";
|