[LON-CAPA-cvs] cvs: loncom /interface lonstatistics.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Fri, 10 Jan 2003 22:26:29 -0000
matthew Fri Jan 10 17:26:29 2003 EDT
Modified files:
/loncom/interface lonstatistics.pm
Log:
Clean every key out of the cache as soon as we are told we are not going to
use it.
Committing this because it may be useful in development. Probably unnecc.
for 0.6.1.
Index: loncom/interface/lonstatistics.pm
diff -u loncom/interface/lonstatistics.pm:1.55 loncom/interface/lonstatistics.pm:1.56
--- loncom/interface/lonstatistics.pm:1.55 Tue Nov 26 13:02:38 2002
+++ loncom/interface/lonstatistics.pm Fri Jan 10 17:26:29 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonstatistics.pm,v 1.55 2002/11/26 18:02:38 minaeibi Exp $
+# $Id: lonstatistics.pm,v 1.56 2003/01/10 22:26:29 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -74,13 +74,25 @@
'reportSelected',
'StudentAssessmentStudent',
'ProblemStatisticsSort']);
+ &CheckFormElement($cache, 'DownloadAll', 'DownloadAll', 'false');
+ if ($cache->{'DownloadAll'} ne 'false') {
+ # Clean the hell out of that cache!
+ # We cannot untie the hash at this scope (stupid libgd :( )
+ # So, remove every single key. What a waste of time....
+ # Of course, if you are doing this you are probably resigned
+ # to waiting a while.
+ &Apache::lonnet::logthis("Cleaning out the cache file");
+ while (my ($key,undef)=each(%$cache)) {
+ next if ($key eq 'DownloadAll');
+ delete($cache->{$key});
+ }
+ }
&CheckFormElement($cache, 'Status', 'Status', 'Active');
&CheckFormElement($cache, 'postdata', 'reportSelected', 'Class list');
&CheckFormElement($cache, 'reportSelected', 'reportSelected',
'Class list');
$cache->{'reportSelected'} =
&Apache::lonnet::unescape($cache->{'reportSelected'});
- &CheckFormElement($cache, 'DownloadAll', 'DownloadAll', 'false');
&CheckFormElement($cache, 'sort', 'sort', 'fullname');
&CheckFormElement($cache, 'download', 'download', 'false');
&CheckFormElement($cache, 'StatisticsMaps',