--- loncom/interface/statistics/loncorrectproblemplot.pm 2004/03/08 18:42:58 1.10 +++ loncom/interface/statistics/loncorrectproblemplot.pm 2004/12/10 20:41:39 1.14 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncorrectproblemplot.pm,v 1.10 2004/03/08 18:42:58 matthew Exp $ +# $Id: loncorrectproblemplot.pm,v 1.14 2004/12/10 20:41:39 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -39,10 +39,6 @@ use Apache::lonlocal; my @SubmitButtons = ( { name => 'CreatePlot', text => 'Create Plot' }, - { name => 'ClearCache', - text => 'Clear Caches' }, - { name => 'updatecaches', - text => 'Update Student Data' }, ); ######################################################### @@ -81,23 +77,16 @@ sub BuildCorrectProblemsPage { ''); } # - &Apache::loncoursedata::clear_internal_caches(); - if (exists($ENV{'form.ClearCache'}) || - exists($ENV{'form.updatecaches'}) || - (exists($ENV{'form.firstanalysis'}) && - $ENV{'form.firstanalysis'} ne 'no')) { - &Apache::lonstatistics::Gather_Full_Student_Data($r); - } - if (! exists($ENV{'form.firstanalysis'})) { - $r->print(''); - } else { - $r->print(''); - } + my @CacheButtonHTML = + &Apache::lonstathelpers::manage_caches($r,'Statistics','stats_status'); foreach my $button (@SubmitButtons) { $r->print('{'text'}).'" />'); $r->print(' 'x5); } + foreach my $html (@CacheButtonHTML) { + $r->print($html.(' 'x5)); + } $r->rflush(); # # Determine which problem symbs we are to sum over @@ -121,6 +110,14 @@ sub BuildCorrectProblemsPage { } } } + } else { + $title = "All Problems"; + foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()){ + foreach my $res (@{$seq->{'contents'}}) { + next if ($res->{'type'} ne 'assessment'); + $total_parts += scalar(@{$res->{'parts'}}); + } + } } my ($starttime,$endtime) = &Apache::lonstathelpers::get_time_limits(); if (defined($starttime) || defined($endtime)) { @@ -135,6 +132,8 @@ sub BuildCorrectProblemsPage { $Apache::lonstatistics::enrollment_status,undef, $starttime,$endtime); $r->print(&AnalyzeScoreData($score_data,$title,$total_parts)); + } else { + $r->print('
Range | Count |
---|
Range | Count |
---|
".&Apache::loncommon::DrawBarGraph($title.' N = '.$sum,
+ 'Correct Problems (max possible = '.$total_parts.')',
'Number of students',
$max,
undef, # colors
\@Xdata,
\@Ydata).
"\n
\n".$Str;
+ $Str .= '
'; + # $Str .= '
'.&mt('Sections').' | '; @@ -289,8 +291,7 @@ sub CreateInterface { $Str .= ''. &Apache::lonstathelpers::limit_by_time_form().' | '; $Str .= '
'."\n"; $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5); $Str .= ' | '; @@ -311,9 +312,14 @@ sub CreateInterface { $only_seq_with_assessments); $Str .= ''; # - ## $Str .= '