[LON-CAPA-cvs] cvs: loncom /homework bridgetask.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 21 Dec 2005 19:13:06 -0000
albertel Wed Dec 21 14:13:06 2005 EDT
Modified files:
/loncom/homework bridgetask.pm
Log:
- grading a BT can cause alot of data spew, so only store items that changed
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.93 loncom/homework/bridgetask.pm:1.94
--- loncom/homework/bridgetask.pm:1.93 Wed Dec 21 14:10:33 2005
+++ loncom/homework/bridgetask.pm Wed Dec 21 14:13:05 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.93 2005/12/21 19:10:33 albertel Exp $
+# $Id: bridgetask.pm,v 1.94 2005/12/21 19:13:05 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -689,6 +689,17 @@
}
return (undef,undef)
}
+
+sub minimize_storage {
+ foreach my $key (keys(%Apache::lonhomework::results)) {
+ if ($key =~ /regrader$/) { next; }
+ if ($Apache::lonhomework::results{$key} eq
+ $Apache::lonhomework::history{$key}) {
+ delete($Apache::lonhomework::results{$key});
+ }
+ }
+}
+
sub end_Task {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
my $result='';
@@ -897,6 +908,7 @@
$Apache::lonhomework::results{"resource.0.solved"}=
$Apache::lonhomework::results{"resource.$version.0.solved"};
}
+ &minimize_storage();
&Apache::structuretags::finalize_storage();
}
} elsif ($target eq 'webgrade') {