--- loncom/interface/statistics/lonproblemstatistics.pm 2004/05/14 20:30:17 1.85 +++ loncom/interface/statistics/lonproblemstatistics.pm 2004/06/04 21:42:18 1.87 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemstatistics.pm,v 1.85 2004/05/14 20:30:17 matthew Exp $ +# $Id: lonproblemstatistics.pm,v 1.87 2004/06/04 21:42:18 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -298,6 +298,17 @@ my @Fields = ( # selectable => 'no', # defaultselected => 'yes', # }, +## resptypes included for research purposes. Commented out most of the time. +# { name => 'resptypes', +# title => 'Response Types', +# align => 'left', +# color => '#FFFFFF', +# sortable => 'no', +# graphable => 'no', +# long_title => 'Response Types used in this problem', +# selectable => 'no', +# defaultselected => 'yes', +# }, ); my @SeqFields = ( @@ -536,6 +547,7 @@ select sections, maps, and output. ############################################### ############################################### sub CreateInterface { + my ($r) = @_; # &parse_field_selection(); # @@ -571,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; } @@ -621,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.'). '

'. @@ -636,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(); # @@ -652,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'}; @@ -1519,6 +1533,7 @@ sub get_statistics { # &Apache::lonnet::EXT('resource.'.$part.'.duedate',$symb); # $data->{'opendate'} = # &Apache::lonnet::EXT('resource.'.$part.'.opendate',$symb); +# $data->{'resptypes'} = join(',',@{$resource->{'partdata'}->{$part}->{'ResponseTypes'}}); return $data; }