[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 17 Mar 2003 21:33:33 -0000
albertel Mon Mar 17 16:33:33 2003 EDT
Modified files:
/loncom/homework inputtags.pm
Log:
- don't store submissions on parts that are already correct
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.84 loncom/homework/inputtags.pm:1.85
--- loncom/homework/inputtags.pm:1.84 Fri Feb 7 17:03:21 2003
+++ loncom/homework/inputtags.pm Mon Mar 17 16:33:33 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.84 2003/02/07 22:03:21 albertel Exp $
+# $Id: inputtags.pm,v 1.85 2003/03/17 21:33:33 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -388,7 +388,7 @@
foreach my $key (keys(%Apache::lonhomework::results)) {
if (($key =~ /^resource\.$id\./) && ($key !~ /\.collaborators$/)) {
&Apache::lonxml::debug("Removing $key");
- delete($Apache::lonhomework::results{$key});
+ delete($Apache::lonhomework::results{$key});
}
}
#and since they didn't do anything we were never here
@@ -396,6 +396,17 @@
} else {
$Apache::lonhomework::results{"resource.$id.previous"} = '0';
}
+ } elsif ( $Apache::lonhomework::history{"resource.$id.solved"} =~
+ /^correct/ ) {
+ #delete all data as they student already has it correct
+ foreach my $key (keys(%Apache::lonhomework::results)) {
+ if (($key =~ /^resource\.$id\./) && ($key !~ /\.collaborators$/)) {
+ &Apache::lonxml::debug("Removing $key");
+ delete($Apache::lonhomework::results{$key});
+ }
+ }
+ #and since they didn't do anything we were never here
+ return '';
}
$Apache::lonhomework::results{"resource.$id.award"} = $award;
}