Diff for /loncom/interface/statistics/lonproblemstatistics.pm between versions 1.86 and 1.87

version 1.86, 2004/05/18 18:12:19 version 1.87, 2004/06/04 21:42:18
Line 547  select sections, maps, and output. Line 547  select sections, maps, and output.
 ###############################################  ###############################################
 ###############################################  ###############################################
 sub CreateInterface {  sub CreateInterface {
       my ($r) = @_;
     #      #
     &parse_field_selection();      &parse_field_selection();
     #      #
Line 582  sub CreateInterface { Line 583  sub CreateInterface {
     $Str .= '</td><td>'.&field_selection_input();      $Str .= '</td><td>'.&field_selection_input();
     $Str .= '</td></tr>'."\n";      $Str .= '</td></tr>'."\n";
     $Str .= '</table>'."\n";      $Str .= '</table>'."\n";
       #
       $Str .= '<p>'.&mt('Status: [_1]',
                            '<input type="text" '.
                            'name="stats_status" size="60" value="" />'
                            ).
                            '</nobr></p>';
       #
     $Str .= '<input type="submit" name="GenerateStatistics" value="'.      $Str .= '<input type="submit" name="GenerateStatistics" value="'.
         &mt('Generate Statistics').'" />';          &mt('Generate Statistics').'" />';
     $Str .= '&nbsp;'x5;      $Str .= '&nbsp;'x5;
     $Str .= 'Plot '.&plot_dropdown().('&nbsp;'x10);      $Str .= 'Plot '.&plot_dropdown().('&nbsp;'x10);
     $Str .= '<input type="submit" name="ClearCache" value="'.      #
         &mt('Clear Caches').'" />';  
     $Str .= '&nbsp;'x5;  
     $Str .= '<input type="submit" name="UpdateCache" value="'.  
         &mt('Update Student Data').'" />';  
     $Str .= '&nbsp;'x5;  
     $Str .= '<input type="submit" name="Excel" value="'.  
         &mt('Produce Excel Output').'" />';  
     $Str .= '&nbsp;'x5;  
     return $Str;      return $Str;
 }  }
   
Line 632  sub BuildProblemStatisticsPage { Line 632  sub BuildProblemStatisticsPage {
     undef(%SeqStat);      undef(%SeqStat);
     #      #
     # Finally let the user know we are here      # Finally let the user know we are here
     my $interface = &CreateInterface();      my $interface = &CreateInterface($r);
     $r->print($interface);      $r->print($interface);
     $r->print('<input type="hidden" name="sortby" value="'.$ENV{'form.sortby'}.      $r->print('<input type="hidden" name="sortby" value="'.$ENV{'form.sortby'}.
               '" />');                '" />');
     #      #
     if (! exists($ENV{'form.statsfirstcall'})) {      my @CacheButtonHTML = 
         $r->print('<input type="hidden" name="statsfirstcall" value="yes" />');          &Apache::lonstathelpers::manage_caches($r,'Statistics','stats_status');
       my $Str;
       foreach my $html (@CacheButtonHTML) {
           $Str.=$html.('&nbsp;'x5);
       }
       #
       $r->print($Str);
       if (! exists($ENV{'form.firstrun'})) {
         $r->print('<h3>'.          $r->print('<h3>'.
                   &mt('Press "Generate Statistics" when you are ready.').                    &mt('Press "Generate Statistics" when you are ready.').
                   '</h3><p>'.                    '</h3><p>'.
Line 647  sub BuildProblemStatisticsPage { Line 654  sub BuildProblemStatisticsPage {
                       ' will not have this delay.').                        ' will not have this delay.').
                   '</p>');                    '</p>');
         return;          return;
     } elsif ($ENV{'form.statsfirstcall'} eq 'yes' ||   
              exists($ENV{'form.UpdateCache'}) ||  
              exists($ENV{'form.ClearCache'}) ) {  
         $r->print('<input type="hidden" name="statsfirstcall" value="no" />');  
         &Apache::lonstatistics::Gather_Student_Data($r);  
     } else {  
         $r->print('<input type="hidden" name="statsfirstcall" value="no" />');  
     }      }
     $r->rflush();      $r->rflush();
     #      #
Line 663  sub BuildProblemStatisticsPage { Line 663  sub BuildProblemStatisticsPage {
     #      #
     if (exists($ENV{'form.Excel'})) {      if (exists($ENV{'form.Excel'})) {
         &Excel_output($r);          &Excel_output($r);
     } else {      } else { 
           $r->print('<input type="submit" name="Excel" value="'.
                     &mt('Produce Excel Output').'" />'.'&nbsp;'x5);
           $r->rflush();
         my $count = 0;          my $count = 0;
         foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) {          foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) {
             $count += $seq->{'num_assess_parts'};              $count += $seq->{'num_assess_parts'};

Removed from v.1.86  
changed lines
  Added in v.1.87


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