[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm

bowersj2 lon-capa-cvs@mail.lon-capa.org
Mon, 13 Jan 2003 22:41:20 -0000


bowersj2		Mon Jan 13 17:41:20 2003 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  For researching bug #1165, navmaps will loudly declare at the bottom of
  the screen if it untied the hashes correctly. DO NOT MERGE THIS INTO ANY
  RELEASE ;-)
  
  If I were a Real Man I'd do a cvs branch for this, but I don't really
  care to learn how for something this trivial...
  
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.125 loncom/interface/lonnavmaps.pm:1.126
--- loncom/interface/lonnavmaps.pm:1.125	Fri Jan 10 14:03:06 2003
+++ loncom/interface/lonnavmaps.pm	Mon Jan 13 17:41:20 2003
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.125 2003/01/10 19:03:06 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.126 2003/01/13 22:41:20 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -273,6 +273,12 @@
     $mapIterator->next(); # discard the first BEGIN_MAP
     my $curRes = $mapIterator->next();
     my $counter = 0;
+<<<<<<< lonnavmaps.pm
+
+    # We only need to do this if we need to open the maps to show the
+    # current position
+    while ($depth > 0 && !$ENV{'form.alreadyHere'}) {
+=======
     my $foundJump = ($jumpType == $NOTHING); # look for jump point if we have one
     my $looped = 0; 
 
@@ -280,6 +286,7 @@
     # current position. This will change the counter so we can't count
     # for the jump marker with this loop.
     while ($depth > 0 && !$ENV{'form.alreadyHere'}) {
+>>>>>>> 1.122
         if ($curRes == $mapIterator->BEGIN_MAP()) { $depth++; }
         if ($curRes == $mapIterator->END_MAP()) { $depth--; }
 
@@ -298,6 +305,9 @@
             }
             $ENV{'form.alreadyHere'} = 1;
         }
+<<<<<<< lonnavmaps.pm
+            
+=======
         $looped = 1;
 
         $curRes = $mapIterator->next();
@@ -327,6 +337,7 @@
             $foundJump = 1;
         }
 
+>>>>>>> 1.122
         $curRes = $mapIterator->next();
     }
     
@@ -686,10 +697,10 @@
         $r->print('<script>location += "#curloc";</script>');
     }
 
-    $r->print("</body></html>");
-
     $navmap->untieHashes();
 
+    $r->print("<h1>Course Map Untied</h1></body></html>");
+
     return OK;
 }
 
@@ -1479,6 +1490,10 @@
             if ($curRes == $iterator->END_MAP()) { $depth--; }
         
             if (ref($curRes)) {
+<<<<<<< lonnavmaps.pm
+                # If there's only one resource, this will save it
+                $resource = $curRes; $resourceCount++;
+=======
                 # If there's only one resource, this will save it
                 # we have to filter empty resources from consideration here,
                 # or even "empty", redirecting maps have two (start & finish)
@@ -1486,6 +1501,7 @@
                 if($direction == FORWARD && $curRes->src()) { 
                     $resource = $curRes; $resourceCount++; 
                 }
+>>>>>>> 1.122
                 my $resultingVal = $curRes->{DATA}->{$valName};
                 my $nextResources = $curRes->$nextResourceMethod();
                 my $nextCount = scalar(@{$nextResources});