Diff for /loncom/interface/lonnavmaps.pm between versions 1.129 and 1.129.2.1

version 1.129, 2003/01/14 17:19:27 version 1.129.2.1, 2003/02/01 19:55:00
Line 1679  sub next { Line 1679  sub next {
     # If this is a blank resource, don't actually return it.      # If this is a blank resource, don't actually return it.
     # Should you ever find you need it, make sure to add an option to the code      # Should you ever find you need it, make sure to add an option to the code
     #  that you can use; other things depend on this behavior.      #  that you can use; other things depend on this behavior.
     if (!$self->{HERE}->src()) {      if (!$self->{HERE}->src() || !$self->{HERE}->browsePriv()) {
         return $self->next();          return $self->next();
     }      }
   
Line 2618  sub getNext { Line 2618  sub getNext {
         my $next = $choice->goesto();          my $next = $choice->goesto();
         $next = $self->{NAV_MAP}->getById($next);          $next = $self->{NAV_MAP}->getById($next);
   
         # Don't remember it if the student doesn't have browse priviledges          push @branches, $next;
         # future note: this may properly belong in the client of the resource  
         my $browsePriv = $self->{BROWSE_PRIV};  
         if (!defined($browsePriv)) {  
             $browsePriv = &Apache::lonnet::allowed('bre', $self->src);  
             $self->{BROWSE_PRIV} = $browsePriv;  
         }  
         if (!($browsePriv ne '2' && $browsePriv ne 'F')) {  
             push @branches, $next;  
         }  
     }      }
     return \@branches;      return \@branches;
 }  }
Line 2641  sub getPrevious { Line 2632  sub getPrevious {
         my $prev = $choice->comesfrom();          my $prev = $choice->comesfrom();
         $prev = $self->{NAV_MAP}->getById($prev);          $prev = $self->{NAV_MAP}->getById($prev);
   
         # Don't remember it if the student doesn't have browse priviledges          push @branches, $prev;
         # future note: this may properly belong in the client of the resource  
         my $browsePriv = $self->{BROWSE_PRIV};  
         if (!defined($browsePriv)) {  
             $browsePriv = &Apache::lonnet::allowed('bre', $self->src);  
             $self->{BROWSE_PRIV} = $browsePriv;  
         }  
         if (!($browsePriv ne '2' && $browsePriv ne 'F')) {  
             push @branches, $prev;  
         }  
     }      }
     return \@branches;      return \@branches;
 }  }
   
   sub browsePriv {
       my $self = shift;
       if (defined($self->{BROWSE_PRIV})) {
           return $self->{BROWSE_PRIV};
       }
   
       $self->{BROWSE_PRIV} = &Apache::lonnet::allowed('bre', $self->src());
   }
   
 =pod  =pod
   
 =back  =back

Removed from v.1.129  
changed lines
  Added in v.1.129.2.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>