[LON-CAPA-cvs] cvs: loncom(version_2_1_X) /lonnet/perl lonnet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 05 Jun 2006 20:10:21 -0000


albertel		Mon Jun  5 16:10:21 2006 EDT

  Modified files:              (Branch: version_2_1_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - backport 1.744
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.683.2.21 loncom/lonnet/perl/lonnet.pm:1.683.2.22
--- loncom/lonnet/perl/lonnet.pm:1.683.2.21	Mon May 15 19:42:52 2006
+++ loncom/lonnet/perl/lonnet.pm	Mon Jun  5 16:10:20 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.683.2.21 2006/05/15 23:42:52 albertel Exp $
+# $Id: lonnet.pm,v 1.683.2.22 2006/06/05 20:10:20 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4877,8 +4877,14 @@
 	    if ( (defined($Apache::lonhomework::parsing_a_problem)
 		  || defined($Apache::lonhomework::parsing_a_task))
 		 &&
-		 ($symbparm eq &symbread()) ) {
-		return $Apache::lonhomework::history{$qualifierrest};
+		 ($symbparm eq &symbread()) ) {	
+		# if we are in the middle of processing the resource the
+		# get the value we are planning on committing
+                if (defined($Apache::lonhomework::results{$qualifierrest})) {
+                    return $Apache::lonhomework::results{$qualifierrest};
+                } else {
+                    return $Apache::lonhomework::history{$qualifierrest};
+                }
 	    } else {
 		my %restored;
 		if ($publicuser || $env{'request.state'} eq 'construct') {