--- loncom/interface/statistics/lonstathelpers.pm 2004/06/15 14:43:45 1.15 +++ loncom/interface/statistics/lonstathelpers.pm 2004/08/03 19:53:12 1.18 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstathelpers.pm,v 1.15 2004/06/15 14:43:45 matthew Exp $ +# $Id: lonstathelpers.pm,v 1.18 2004/08/03 19:53:12 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -639,7 +639,7 @@ sub ensure_proper_cache { my ($symb) = @_; my $cid = $ENV{'request.course.id'}; my $new_filename = '/home/httpd/perl/tmp/'. - 'problemanalsysis_'.$cid.'answer_cache.db'; + 'problemanalysis_'.$cid.'_answer_cache.db'; if (! defined($cache_filename) || $cache_filename ne $new_filename || ! defined($current_symb) || @@ -1073,24 +1073,40 @@ Returns: An array of scalars containing sub manage_caches { my ($r,$formname,$inputname) = @_; &Apache::loncoursedata::clear_internal_caches(); + my $sectionkey = + join(',', + map { + &Apache::lonnet::escape($_); + } sort(@Apache::lonstatistics::SelectedSections) + ); + my $statuskey = $Apache::lonstatistics::enrollment_status; if (exists($ENV{'form.ClearCache'}) || - exists($ENV{'form.updatecaches'}) || - (exists($ENV{'form.firstrun'}) && - $ENV{'form.firstrun'} ne 'no')) { + exists($ENV{'form.updatecaches'}) || + (exists($ENV{'form.firstrun'}) && $ENV{'form.firstrun'} ne 'no') || + (exists($ENV{'form.prevsection'}) && + $ENV{'form.prevsection'} ne $sectionkey) || + (exists($ENV{'form.prevenrollstatus'}) && + $ENV{'form.prevenrollstatus'} ne $statuskey) + ) { &Apache::lonstatistics::Gather_Full_Student_Data($r,$formname, $inputname); } # + my @Buttons = + ('', + ''. + &Apache::loncommon::help_open_topic('Statistics_Cache'), + '', + '' + ); + # if (! exists($ENV{'form.firstrun'})) { $r->print(''); } else { $r->print(''); } - my @Buttons = - ('', - ''); # return @Buttons; }