[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm

ng lon-capa-cvs@mail.lon-capa.org
Thu, 25 Jul 2002 20:55:13 -0000


ng		Thu Jul 25 16:55:13 2002 EDT

  Modified files:              
    /loncom/homework	inputtags.pm 
  Log:
  Allow collaborators to be saved even if the student does not change the answer.
  Done as per Guy's instructions.
  
  
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.57 loncom/homework/inputtags.pm:1.58
--- loncom/homework/inputtags.pm:1.57	Mon Jun 24 17:23:26 2002
+++ loncom/homework/inputtags.pm	Thu Jul 25 16:55:13 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.57 2002/06/24 21:23:26 albertel Exp $
+# $Id: inputtags.pm,v 1.58 2002/07/25 20:55:13 ng Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -346,9 +346,10 @@
       delete($Apache::lonhomework::results{"resource.$id.tries"});
       $Apache::lonhomework::results{"resource.$id.previous"} = '1';
     } elsif ( $previously_used eq 'PREVIOUSLY_LAST') {
-      #delete all data as they student didn't do anything
+      #delete all data as they student didn't do anything, but save
+      #the list of collaborators.
       foreach my $key (keys(%Apache::lonhomework::results)) {
-	if ($key =~ /^resource\.$id\./) {
+	if (($key =~ /^resource\.$id\./) && ($key !~ /\.collaborators$/)) {
 	  &Apache::lonxml::debug("Removing $key");
 	  delete($Apache::lonhomework::results{$key});
 	}