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

bowersj2 lon-capa-cvs@mail.lon-capa.org
Mon, 28 Oct 2002 21:11:39 -0000


bowersj2		Mon Oct 28 16:11:39 2002 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Commit some other dumb fixes. Start getting the iterator to also
  go backwards; a necessary step to get to where I'm going.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.89 loncom/interface/lonnavmaps.pm:1.90
--- loncom/interface/lonnavmaps.pm:1.89	Mon Oct 28 15:48:29 2002
+++ loncom/interface/lonnavmaps.pm	Mon Oct 28 16:11:39 2002
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.89 2002/10/28 20:48:29 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.90 2002/10/28 21:11:39 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1004,6 +1004,7 @@
     $mapIterator->next();
     $curRes = $mapIterator->next();
     my $deltadepth = 0;
+    $depth = 1;
 
     my @backgroundColors = ("#FFFFFF", "#F6F6F6");
     my $rowNum = 0;
@@ -2053,7 +2054,7 @@
     if ($self->{DIRECTION} == FORWARD) {
         push @{$self->{BRANCH_STACK}}, $self->{FIRST_RESOURCE};
     } else {
-        push @{$self->{BRANCH_STACK}), $self->{FINISH_RESOURCE};
+        push @{$self->{BRANCH_STACK}}, $self->{FINISH_RESOURCE};
     }
     $self->{BRANCH_STACK_SIZE} = 1;
 
@@ -2151,10 +2152,11 @@
     $self->{ALREADY_SEEN}->{$self->{HERE}->{ID}} = 1;
     
     # Get the next possible resources
+    my $nextUnfiltered;
     if ($self->{DIRECTION} == FORWARD()) {
-        my $nextUnfiltered = $self->{HERE}->getNext();
+        $nextUnfiltered = $self->{HERE}->getNext();
     } else {
-        my $nextUnfiltered = $self->{HERE}->getPrevious();
+        $nextUnfiltered = $self->{HERE}->getPrevious();
     }
     my $next = [];