version 1.15, 2004/06/15 14:43:45
|
version 1.17, 2004/06/25 21:02:41
|
Line 1073 Returns: An array of scalars containing
|
Line 1073 Returns: An array of scalars containing
|
sub manage_caches { |
sub manage_caches { |
my ($r,$formname,$inputname) = @_; |
my ($r,$formname,$inputname) = @_; |
&Apache::loncoursedata::clear_internal_caches(); |
&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'}) || |
if (exists($ENV{'form.ClearCache'}) || |
exists($ENV{'form.updatecaches'}) || |
exists($ENV{'form.updatecaches'}) || |
(exists($ENV{'form.firstrun'}) && |
(exists($ENV{'form.firstrun'}) && $ENV{'form.firstrun'} ne 'no') || |
$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, |
&Apache::lonstatistics::Gather_Full_Student_Data($r,$formname, |
$inputname); |
$inputname); |
} |
} |
# |
# |
|
my @Buttons = |
|
('<input type="submit" name="ClearCache" '. |
|
'value="'.&mt('Clear Caches').'" />', |
|
'<input type="submit" name="updatecaches" '. |
|
'value="'.&mt('Update Caches').'" />'. |
|
&Apache::loncommon::help_open_topic('Statistics_Cache'), |
|
'<input type="hidden" name="prevsection" value="'.$sectionkey.'" />', |
|
'<input type="hidden" name="prevenrollstatus" value="'.$statuskey.'" />' |
|
); |
|
# |
if (! exists($ENV{'form.firstrun'})) { |
if (! exists($ENV{'form.firstrun'})) { |
$r->print('<input type="hidden" name="firstrun" value="yes" />'); |
$r->print('<input type="hidden" name="firstrun" value="yes" />'); |
} else { |
} else { |
$r->print('<input type="hidden" name="firstrun" value="no" />'); |
$r->print('<input type="hidden" name="firstrun" value="no" />'); |
} |
} |
my @Buttons = |
|
('<input type="submit" name="ClearCache" '. |
|
'value="'.&mt('Clear Caches').'" />', |
|
'<input type="submit" name="updatecaches" '. |
|
'value="'.&mt('Update Caches').'" />'); |
|
# |
# |
return @Buttons; |
return @Buttons; |
} |
} |