Diff for /loncom/interface/lonnavmaps.pm between versions 1.341 and 1.342

version 1.341, 2005/09/29 17:14:14 version 1.342, 2005/10/01 06:21:12
Line 690  sub timeToHumanString { Line 690  sub timeToHumanString {
  } elsif ($type eq 'end') {   } elsif ($type eq 'end') {
     $conjunction='by';      $conjunction='by';
  }   }
  &Apache::lonnet::logthis("<p>$conjunction $type</p>");  
         # Is it this year?          # Is it this year?
         if ( $time[5] == $now[5]) {          if ( $time[5] == $now[5]) {
             # Return on Month Day, HH:MM meridian              # Return on Month Day, HH:MM meridian
Line 1134  sub render_resource { Line 1133  sub render_resource {
     if ($resource->randomout()) {      if ($resource->randomout()) {
         $nonLinkedText .= ' <i>(hidden)</i> ';          $nonLinkedText .= ' <i>(hidden)</i> ';
     }      }
       if (!$resource->condval()) {
           $nonLinkedText .= ' <i>(conditionally hidden)</i> ';
       }
           
     # We're done preparing and finally ready to start the rendering      # We're done preparing and finally ready to start the rendering
     my $result = "<td align='left' valign='center'>";      my $result = "<td align='left' valign='center'>";
Line 3582  sub condition { Line 3584  sub condition {
     my $condition=&Apache::lonnet::directcondval($condid);      my $condition=&Apache::lonnet::directcondval($condid);
     return $condition;      return $condition;
 }  }
   sub condval {
       my $self=shift;
       my $uri=&Apache::lonnet::deversion(&Apache::lonnet::declutter($self->src()));
       my ($pathname,$filename)=($uri=~m|(.*)/([^/]*)|);
       $pathname=~s/^adm\/wrapper\///;    
   
       my $match=($env{'acc.res.'.$env{'request.course.id'}.'.'.$pathname}=~
          /\&\Q$filename\E\:([\d\|]+)\&/);
       if ($match) {
    return &Apache::lonnet::condval($1);
       }
       return 0;
   }
 sub compTitle {  sub compTitle {
     my $self = shift;      my $self = shift;
     my $title = $self->title();      my $title = $self->title();
Line 4773  sub getNext { Line 4787  sub getNext {
     my $to = $self->to();      my $to = $self->to();
     foreach my $branch ( split(/,/, $to) ) {      foreach my $branch ( split(/,/, $to) ) {
         my $choice = $self->{NAV_MAP}->getById($branch);          my $choice = $self->{NAV_MAP}->getById($branch);
         if (!$choice->condition()) { next; }          #if (!$choice->condition()) { next; }
         my $next = $choice->goesto();          my $next = $choice->goesto();
         $next = $self->{NAV_MAP}->getById($next);          $next = $self->{NAV_MAP}->getById($next);
   

Removed from v.1.341  
changed lines
  Added in v.1.342


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