Diff for /loncom/interface/lonnavmaps.pm between versions 1.212 and 1.215

version 1.212, 2003/06/25 18:32:06 version 1.215, 2003/07/16 19:22:49
Line 1041  sub render_long_status { Line 1041  sub render_long_status {
         $result .= '(randomly select ' . $resource->randompick() .')';          $result .= '(randomly select ' . $resource->randompick() .')';
     }      }
   
       # Debugging code
       #$result .= " " . $resource->awarded($part) . '/' . $resource->weight($part) .
       # ' - Part: ' . $part;
   
     $result .= "</td>\n";      $result .= "</td>\n";
           
     return $result;      return $result;
Line 2077  sub retrieveResources { Line 2081  sub retrieveResources {
         $map = $self->getResourceByUrl($map);          $map = $self->getResourceByUrl($map);
     }      }
   
       # If nothing was passed, assume top-level map
       if (!$map) {
    $map = $self->getById('0.0');
       }
   
     # Check the map's validity.      # Check the map's validity.
     if (!$map || !$map->is_map()) {      if (!$map->is_map()) {
         # Oh, to throw an exception.... how I'd love that!          # Oh, to throw an exception.... how I'd love that!
         return ();          return ();
     }      }
   
     # Get an iterator.      # Get an iterator.
     my $it = $self->getIterator($map->map_start(), $map->map_finish(),      my $it = $self->getIterator($map->map_start(), $map->map_finish(),
                                 !$recursive);                                  undef, $recursive);
   
     my @resources = ();      my @resources = ();
   
Line 2114  sub retrieveResources { Line 2123  sub retrieveResources {
             }              }
         }          }
   
       } continue {
         $curRes = $it->next();          $curRes = $it->next();
     }      }
   
Line 2922  sub symb { Line 2932  sub symb {
          $self->navHash('map_id_'.$first))            $self->navHash('map_id_'.$first)) 
         . '___' . $second . '___' . $symbSrc;          . '___' . $second . '___' . $symbSrc;
 }  }
 sub title { my $self=shift; return $self->navHash("title_", 1); }  sub title { 
       my $self=shift; 
       if ($self->{ID} eq '0.0') {
    # If this is the top-level map, return the title of the course
    # since this map can not be titled otherwise.
    return $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
       }
       return $self->navHash("title_", 1); }
 sub to { my $self=shift; return $self->navHash("to_", 1); }  sub to { my $self=shift; return $self->navHash("to_", 1); }
 sub compTitle {  sub compTitle {
     my $self = shift;      my $self = shift;
Line 3352  sub responseType { Line 3369  sub responseType {
     my $part = shift;      my $part = shift;
   
     $self->extractParts();      $self->extractParts();
     return $self->{RESPONSE_TYPE}->{$part};      return $self->{RESPONSE_TYPES}->{$part};
 }  }
   
 sub responseIds {  sub responseIds {

Removed from v.1.212  
changed lines
  Added in v.1.215


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