--- loncom/interface/statistics/loncorrectproblemplot.pm 2005/04/07 06:56:24 1.18 +++ loncom/interface/statistics/loncorrectproblemplot.pm 2008/10/30 17:45:25 1.24 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncorrectproblemplot.pm,v 1.18 2005/04/07 06:56:24 albertel Exp $ +# $Id: loncorrectproblemplot.pm,v 1.24 2008/10/30 17:45:25 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -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'). '

'); } # @@ -135,6 +136,7 @@ sub BuildCorrectProblemsPage { &Apache::loncoursedata::populate_weight_table(); my $score_data = &Apache::loncoursedata::get_student_scores ([&Apache::lonstatistics::get_selected_sections()], + [&Apache::lonstatistics::get_selected_groups()], \@ProblemSymbs, $Apache::lonstatistics::enrollment_status,undef, $starttime,$endtime); @@ -246,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)) { @@ -288,36 +290,47 @@ 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 .= ''; - $Str .= ''; - $Str .= ''; - $Str .= ''; - $Str .= ''."\n"; + $Str .= &Apache::loncommon::start_data_table(); + $Str .= &Apache::loncommon::start_data_table_header_row(); + $Str .= ''; + $Str .= ''; + $Str .= ''; + $Str .= ''; + $Str .= ''; + $Str .= &Apache::loncommon::end_data_table_header_row(); # - $Str .= ''; # - $Str .= ''; + $Str .= ''."\n"; # + $Str .= ''; # - $Str .= ''."\n"; - $Str .= '
'.&mt('Sections').''.&mt('Enrollment Status').''.&mt('Sequences and Folders').''. - &Apache::lonstathelpers::limit_by_time_form().'
'.&mt('Sections').''.&mt('Groups').''.&mt('Access Status').''.&mt('Sequences and Folders').''.&mt('Time Period').'
'."\n"; + $Str .= &Apache::loncommon::start_data_table_row(); + $Str .= ''."\n"; $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5); $Str .= ''; + $Str .= ''."\n"; + $Str .= &Apache::lonstatistics::GroupSelect('Group','multiple',5); + $Str .= ''; $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5); - $Str .= ''."\n"; + $Str .= ''."\n"; $Str .= &Apache::lonstatistics::map_select('Maps','multiple,all',5); $Str .= '
'."\n"; + $Str .= ''."\n"; + $Str .= &Apache::lonstathelpers::limit_by_time_form(); + $Str .= ''; + # + $Str .= &Apache::loncommon::end_data_table_row(); + $Str .= &Apache::loncommon::end_data_table(); # - $Str .= ''.&mt('Status: [_1]', - ''). - ''.'

'; + $Str .= '

' + .&mt('Status: [_1]', + '') + .'

'; + $Str .= '

'; ## return $Str; }