--- loncom/interface/statistics/lonproblemstatistics.pm 2004/05/18 18:12:19 1.86 +++ loncom/interface/statistics/lonproblemstatistics.pm 2004/06/16 14:21:16 1.88 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemstatistics.pm,v 1.86 2004/05/18 18:12:19 matthew Exp $ +# $Id: lonproblemstatistics.pm,v 1.88 2004/06/16 14:21:16 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -547,6 +547,7 @@ select sections, maps, and output. ############################################### ############################################### sub CreateInterface { + my ($r) = @_; # &parse_field_selection(); # @@ -582,19 +583,18 @@ sub CreateInterface { $Str .= ''.&field_selection_input(); $Str .= ''."\n"; $Str .= ''."\n"; + # + $Str .= '

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

'; + # $Str .= ''; $Str .= ' 'x5; $Str .= 'Plot '.&plot_dropdown().(' 'x10); - $Str .= ''; - $Str .= ' 'x5; - $Str .= ''; - $Str .= ' 'x5; - $Str .= ''; - $Str .= ' 'x5; + # return $Str; } @@ -632,13 +632,20 @@ sub BuildProblemStatisticsPage { undef(%SeqStat); # # Finally let the user know we are here - my $interface = &CreateInterface(); + my $interface = &CreateInterface($r); $r->print($interface); $r->print(''); # - if (! exists($ENV{'form.statsfirstcall'})) { - $r->print(''); + my @CacheButtonHTML = + &Apache::lonstathelpers::manage_caches($r,'Statistics','stats_status'); + my $Str; + foreach my $html (@CacheButtonHTML) { + $Str.=$html.(' 'x5); + } + # + $r->print($Str); + if (! exists($ENV{'form.firstrun'})) { $r->print('

'. &mt('Press "Generate Statistics" when you are ready.'). '

'. @@ -647,13 +654,6 @@ sub BuildProblemStatisticsPage { ' will not have this delay.'). '

'); return; - } elsif ($ENV{'form.statsfirstcall'} eq 'yes' || - exists($ENV{'form.UpdateCache'}) || - exists($ENV{'form.ClearCache'}) ) { - $r->print(''); - &Apache::lonstatistics::Gather_Student_Data($r); - } else { - $r->print(''); } $r->rflush(); # @@ -663,7 +663,10 @@ sub BuildProblemStatisticsPage { # if (exists($ENV{'form.Excel'})) { &Excel_output($r); - } else { + } else { + $r->print(''.' 'x5); + $r->rflush(); my $count = 0; foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { $count += $seq->{'num_assess_parts'}; @@ -1384,6 +1387,7 @@ sub compute_statistics_on_sequence { foreach my $res (@{$seq->{'contents'}}) { next if ($res->{'type'} ne 'assessment'); foreach my $part (@{$res->{'parts'}}) { + next if ($res->{'partdata'}->{$part}->{'Survey'}); # # This is where all the work happens my $data = &get_statistics($seq,$res,$part,scalar(@StatsArray)+1);