Diff for /loncom/interface/lonnavmaps.pm between versions 1.240 and 1.242.2.1

version 1.240, 2003/10/09 21:48:51 version 1.242.2.1, 2004/05/06 15:04:00
Line 2345  consisting entirely of empty resources e Line 2345  consisting entirely of empty resources e
 ending resource, will cause a lot of BRANCH_STARTs and BRANCH_ENDs,  ending resource, will cause a lot of BRANCH_STARTs and BRANCH_ENDs,
 but only one resource will be returned.  but only one resource will be returned.
   
   =back
   
 =head2 Normal Usage  =head2 Normal Usage
   
 Normal usage of the iterator object is to do the following:  Normal usage of the iterator object is to do the following:
Line 2365  the depth of the iterator to see when it Line 2367  the depth of the iterator to see when it
 code. It is difficult to get right and harder to understand then  code. It is difficult to get right and harder to understand then
 this. They should be migrated to this new style.  this. They should be migrated to this new style.
   
 =back  
   
 =cut  =cut
   
 # Here are the tokens for the iterator:  # Here are the tokens for the iterator:
Line 3167  sub is_page { Line 3167  sub is_page {
 sub is_problem {  sub is_problem {
     my $self=shift;      my $self=shift;
     my $src = $self->src();      my $src = $self->src();
     return ($src =~ /problem$/);      return ($src =~ /\.(problem|exam|quiz|assess|survey|form|library)$/);
 }  }
 sub is_sequence {  sub is_sequence {
     my $self=shift;      my $self=shift;
Line 3586  sub extractParts { Line 3586  sub extractParts {
     for my $part (split (/,/,$partorder)) {      for my $part (split (/,/,$partorder)) {
  if (!Apache::loncommon::check_if_partid_hidden($part, $self->symb())) {   if (!Apache::loncommon::check_if_partid_hidden($part, $self->symb())) {
     push @parts, $part;      push @parts, $part;
       $parts{$part} = 1;
  }   }
     }      }
     $self->{PARTS} = \@parts;      $self->{PARTS} = \@parts;
Line 3601  sub extractParts { Line 3602  sub extractParts {
     my $part = $1;      my $part = $1;
     # This floods the logs if it blows up      # This floods the logs if it blows up
     if (defined($parts{$part})) {      if (defined($parts{$part})) {
  Apache::lonnet::logthis("$part multiply defined in metadata for " . $self->symb());   &Apache::lonnet::logthis("$part multiply defined in metadata for " . $self->symb());
       }      }
           
     # check to see if part is turned off.      # check to see if part is turned off.
           
Line 3638  sub extractParts { Line 3639  sub extractParts {
                 my $partIdSoFar = '';                  my $partIdSoFar = '';
                 my @partChunks = split /_/, $partStuff;                  my @partChunks = split /_/, $partStuff;
                 my $i = 0;                  my $i = 0;
   
                 for ($i = 0; $i < scalar(@partChunks); $i++) {                  for ($i = 0; $i < scalar(@partChunks); $i++) {
                     if ($partIdSoFar) { $partIdSoFar .= '_'; }                      if ($partIdSoFar) { $partIdSoFar .= '_'; }
                     $partIdSoFar .= $partChunks[$i];                      $partIdSoFar .= $partChunks[$i];
Line 3651  sub extractParts { Line 3651  sub extractParts {
                 }                  }
             }              }
         }          }
   
         $self->{RESPONSE_IDS} = \%responseIdHash;          $self->{RESPONSE_IDS} = \%responseIdHash;
         $self->{RESPONSE_TYPES} = \%responseTypeHash;          $self->{RESPONSE_TYPES} = \%responseTypeHash;
     }      }

Removed from v.1.240  
changed lines
  Added in v.1.242.2.1


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