Diff for /loncom/interface/lonstatistics.pm between versions 1.156.2.7 and 1.159

version 1.156.2.7, 2016/08/14 16:38:05 version 1.159, 2014/02/14 17:09:55
Line 366  sub section_or_group_text { Line 366  sub section_or_group_text {
   
 sub get_students {  sub get_students {
     if (! @Students) {      if (! @Students) {
         &PrepareClasslist();          &PrepareClasslist()
     }      }
     return @Students;      return @Students;
 }  }
Line 511  sub map_select { Line 511  sub map_select {
     if ($selected_maps[0] eq 'all') {      if ($selected_maps[0] eq 'all') {
         $form .= ' selected="selected"';          $form .= ' selected="selected"';
     }      }
     $form .= '>'.&mt('all').'</option>'."\n";      $form .= ">'.&mt('all').'</option>\n";
     #      #
     # Loop through the sequences      # Loop through the sequences
     my @sequences = &selected_sequences_with_assessments('all');      my @sequences = &selected_sequences_with_assessments('all');
Line 547  sub SectionSelect { Line 547  sub SectionSelect {
         &PrepareClasslist()          &PrepareClasslist()
     }      }
     #      #
     # Make sure course's student table is up to date  
     if (@Sections) {  
         &Apache::loncoursedata::ensure_current_sections();  
     }  
     #  
     # Build the form element      # Build the form element
     my $Str = "\n";      my $Str = "\n";
     $Str .= '<select name="'.$elementname.'" ';      $Str .= '<select name="'.$elementname.'" ';
Line 587  sub GroupSelect { Line 582  sub GroupSelect {
         &PrepareClasslist();          &PrepareClasslist();
     }      }
     #      #
     # Make sure course's groupnames and studentgroups tables  
     # are up to date.  
     #  
     if (@Groups) {  
         &Apache::loncoursedata::ensure_current_groups();  
         &Apache::loncoursedata::ensure_current_students_groups();  
     }  
     #  
     # Build the form element      # Build the form element
     my $Str = "\n";      my $Str = "\n";
     $Str .= '<select name="'.$elementname.'" ';      $Str .= '<select name="'.$elementname.'" ';
Line 856  ENDSTYLE Line 843  ENDSTYLE
                                             bug=>'Statistics and Charts'});                                              bug=>'Statistics and Charts'});
     if (! exists($env{'form.reportSelected'}) ||       if (! exists($env{'form.reportSelected'}) || 
         $env{'form.reportSelected'} eq '') {          $env{'form.reportSelected'} eq '') {
         $r->print(&Apache::lonhtmlcommon::breadcrumbs('Statistics Main Page').          $r->print(&Apache::lonhtmlcommon::breadcrumbs('Statistics Main Page'));
                   &CreateMainMenu());          &Apache::lonquickgrades::startGradeScreen($r,'statistics');
           $r->print(&CreateMainMenu());
     } else {      } else {
     #      #
         if (! &Apache::lonmysql::verify_sql_connection()) {          if (! &Apache::lonmysql::verify_sql_connection()) {
Line 880  ENDSTYLE Line 868  ENDSTYLE
         #          #
         # Clean out the caches          # Clean out the caches
         if (exists($env{'form.ClearCache'})) {          if (exists($env{'form.ClearCache'})) {
             &Apache::loncoursedata::delete_caches($env{'request.course.id'});              &Apache::loncoursedata::delete_caches($env{'requres.course.id'});
         }          }
         #          #
         my $GoToPage = $env{'form.reportSelected'};          my $GoToPage = $env{'form.reportSelected'};
Line 944  ENDSTYLE Line 932  ENDSTYLE
         #          #
         $r->print("</form>\n");          $r->print("</form>\n");
     }      }
       &Apache::lonquickgrades::endGradeScreen($r);
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
     $r->rflush();      $r->rflush();
     #      #

Removed from v.1.156.2.7  
changed lines
  Added in v.1.159


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>