--- loncom/interface/statistics/lonstathelpers.pm 2004/06/15 14:43:45 1.15
+++ loncom/interface/statistics/lonstathelpers.pm 2004/06/23 20:50:26 1.16
@@ -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.16 2004/06/23 20:50:26 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1073,24 +1073,39 @@ 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 =
+ ('',
+ '',
+ '',
+ ''
+ );
+ #
if (! exists($ENV{'form.firstrun'})) {
$r->print('');
} else {
$r->print('');
}
- my @Buttons =
- ('',
- '');
#
return @Buttons;
}