Diff for /loncom/interface/statistics/loncorrectproblemplot.pm between versions 1.16 and 1.25

version 1.16, 2005/03/07 20:12:08 version 1.25, 2011/01/17 00:19:41
Line 28 Line 28
 package Apache::loncorrectproblemplot;  package Apache::loncorrectproblemplot;
   
 use strict;  use strict;
 use Apache::lonnet();  use Apache::lonnet;
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonhtmlcommon();  use Apache::lonhtmlcommon();
   use Apache::lonquickgrades();
 use Apache::loncoursedata();  use Apache::loncoursedata();
 use Apache::lonstatistics;  use Apache::lonstatistics;
 use Apache::lonstathelpers;  use Apache::lonstathelpers;
Line 59  sub BuildCorrectProblemsPage { Line 60  sub BuildCorrectProblemsPage {
     my ($r,$c)=@_;      my ($r,$c)=@_;
     #      #
     my %Saveable_Parameters = ('Status' => 'scalar',      my %Saveable_Parameters = ('Status' => 'scalar',
                                'Section' => 'array');                                 'Section' => 'array',
                                  'Groups' => 'array');
     &Apache::loncommon::store_course_settings('correct_problems_plot',      &Apache::loncommon::store_course_settings('correct_problems_plot',
                                               \%Saveable_Parameters);                                                \%Saveable_Parameters);
     &Apache::loncommon::restore_course_settings('correct_problems_plot',      &Apache::loncommon::restore_course_settings('correct_problems_plot',
                                                 \%Saveable_Parameters);                                                  \%Saveable_Parameters);
     #      #
     &Apache::lonstatistics::PrepareClasslist();          &Apache::lonstatistics::PrepareClasslist();    
       
       $r->print(&Apache::lonhtmlcommon::breadcrumbs('Correct Problems Plot'));
       &Apache::lonquickgrades::startGradeScreen($r,'statistics');
     #      #
     $r->print(&CreateInterface());      $r->print(&CreateInterface());
     #      #
Line 73  sub BuildCorrectProblemsPage { Line 78  sub BuildCorrectProblemsPage {
     #      #
     if (@Students < 1) {      if (@Students < 1) {
         $r->print('<h2>'.          $r->print('<h2>'.
                   &mt('There are no students in the sections selected').                    &mt('There are no students in the sections/groups selected').
                   '</h2>');                    '</h2>');
     }      }
     #      #
Line 90  sub BuildCorrectProblemsPage { Line 95  sub BuildCorrectProblemsPage {
     $r->rflush();      $r->rflush();
     #      #
     # Determine which problem symbs we are to sum over      # Determine which problem symbs we are to sum over
     if (exists($ENV{'form.CreatePlot'})) {      if (exists($env{'form.CreatePlot'})) {
         my @ProblemSymbs;          my @ProblemSymbs;
         my $total_weights = 0;          my $total_weights = 0;
         my $title = '';          my $title = '';
Line 122  sub BuildCorrectProblemsPage { Line 127  sub BuildCorrectProblemsPage {
                 }                  }
             }              }
         }          }
           $r->print('<h4>'.
                     &Apache::lonstatistics::section_and_enrollment_description().
                     '</h4>');
         my ($starttime,$endtime) = &Apache::lonstathelpers::get_time_limits();          my ($starttime,$endtime) = &Apache::lonstathelpers::get_time_limits();
         if (defined($starttime) || defined($endtime)) {          if (defined($starttime) || defined($endtime)) {
             # Inform the user what the time limits on the data are.              # Inform the user what the time limits on the data are.
Line 131  sub BuildCorrectProblemsPage { Line 139  sub BuildCorrectProblemsPage {
         }          }
         &Apache::loncoursedata::populate_weight_table();          &Apache::loncoursedata::populate_weight_table();
         my $score_data = &Apache::loncoursedata::get_student_scores          my $score_data = &Apache::loncoursedata::get_student_scores
             (\@Apache::lonstatistics::SelectedSections,              ([&Apache::lonstatistics::get_selected_sections()],
                [&Apache::lonstatistics::get_selected_groups()],
              \@ProblemSymbs,               \@ProblemSymbs,
              $Apache::lonstatistics::enrollment_status,undef,               $Apache::lonstatistics::enrollment_status,undef,
              $starttime,$endtime);               $starttime,$endtime);
Line 243  sub bin_data { Line 252  sub bin_data {
     my @Bins;      my @Bins;
     my $count=0;      my $count=0;
     my $idx=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 $dataset = $data->[$idx++];
         my ($x,$y) = @{$dataset};          my ($x,$y) = @{$dataset};
         while ($x > ($binend-.001)) {          while ($x > ($binend-.001)) {
Line 285  sub CreateInterface { Line 294  sub CreateInterface {
     ##      ##
     ## Environment variable initialization      ## Environment variable initialization
     my $Str;      my $Str;
     $Str .= &Apache::lonhtmlcommon::breadcrumbs(undef,'Correct Problems Plot');  
     $Str .= '<p>';      $Str .= '<p>';
     #      #
     $Str .= '<table cellspacing="5">'."\n";      $Str .= &Apache::loncommon::start_data_table();
     $Str .= '<tr>';      $Str .= &Apache::loncommon::start_data_table_header_row();
     $Str .= '<td align="center"><b>'.&mt('Sections').'</b></td>';      $Str .= '<th>'.&mt('Sections').'</th>';
     $Str .= '<td align="center"><b>'.&mt('Enrollment Status').'</b></td>';      $Str .= '<th>'.&mt('Groups').'</th>';
     $Str .= '<td align="center"><b>'.&mt('Sequences and Folders').'</b></td>';      $Str .= '<th>'.&mt('Access Status').'</th>';
     $Str .= '<td rowspan="2">'.      $Str .= '<th>'.&mt('Sequences and Folders').'</th>';
         &Apache::lonstathelpers::limit_by_time_form().'</td>';      $Str .= '<th>'.&mt('Time Period').'</th>';
     $Str .= '</tr>'."\n";      $Str .= &Apache::loncommon::end_data_table_header_row();
     #      #
     $Str .= '<tr><td align="center">'."\n";      $Str .= &Apache::loncommon::start_data_table_row();
       $Str .= '<td align="center" valign="top">'."\n";
     $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);      $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);
     $Str .= '</td>';      $Str .= '</td>';
     #      #
     $Str .= '<td align="center">';      $Str .= '<td align="center" valign="top">'."\n";
       $Str .= &Apache::lonstatistics::GroupSelect('Group','multiple',5);
       $Str .= '</td>';
       $Str .= '<td align="center" valign="top">';
     $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);      $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);
     $Str .= '</td><td>'."\n";      $Str .= '</td>'."\n";
     #      #
       $Str .= '<td align="center" valign="top">'."\n";
     $Str .= &Apache::lonstatistics::map_select('Maps','multiple,all',5);      $Str .= &Apache::lonstatistics::map_select('Maps','multiple,all',5);
     $Str .= '</td>';      $Str .= '</td>';
     #      #
     $Str .= '</tr>'."\n";      $Str .= '<td align="center" valign="top">'."\n";
     $Str .= '</table>'."\n";      $Str .= &Apache::lonstathelpers::limit_by_time_form();
       $Str .= '</td>';
       #
       $Str .= &Apache::loncommon::end_data_table_row();
       $Str .= &Apache::loncommon::end_data_table();
     #      #
     $Str .= '<nobr>'.&mt('Status: [_1]',      $Str .= '<p><span class="LC_nobreak">'
                          '<input type="text" '.             .&mt('Status: [_1]',
                          'name="stats_status" size="60" value="" />').                      '<input type="text" name="stats_status"'
             '</nobr>'.'</p>';                     .' size="60" value="" readonly="readonly" />')
              .'</span></p>';
       $Str .= '</p>';
     ##      ##
     return $Str;      return $Str;
 }  }

Removed from v.1.16  
changed lines
  Added in v.1.25


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.