Diff for /loncom/interface/lonnavmaps.pm between versions 1.352 and 1.354

version 1.352, 2005/12/02 23:06:02 version 1.354, 2005/12/15 00:53:30
Line 2265  sub get_user_data { Line 2265  sub get_user_data {
     $self->{RETRIEVED_USER_DATA} = 1;      $self->{RETRIEVED_USER_DATA} = 1;
 }  }
   
   sub get_discussion_data {
       my $self = shift;
       if ($self->{RETRIEVED_DISCUSSION_DATA}) {
            return  $self->{DISCUSSION_DATA};
       }
                                                                                   
       my $cid=$env{'request.course.id'};
       my $cdom=$env{'course.'.$cid.'.domain'};
       my $cnum=$env{'course.'.$cid.'.num'};
                                                                                   
       # Retrieve discussion data for resources in course
       my %discussion_data = &Apache::lonnet::dump($cid,$cdom,$cnum);
                                                                                   
       $self->{DISCUSSION_DATA} = \%discussion_data;
       $self->{RETRIEVED_DISCUSSION_DATA} = 1;
       return $self->{DISCUSSION_DATA};
   }
   
   
 # Internal function: Takes a key to look up in the nav hash and implements internal  # Internal function: Takes a key to look up in the nav hash and implements internal
 # memory caching of that key.  # memory caching of that key.
 sub navhash {  sub navhash {
Line 2640  sub getResourceByUrl { Line 2659  sub getResourceByUrl {
     if (ref($resUrl)) { return $resUrl; }      if (ref($resUrl)) { return $resUrl; }
   
     $resUrl = &Apache::lonnet::clutter($resUrl);      $resUrl = &Apache::lonnet::clutter($resUrl);
     if (defined($multiple)) {  
         if ($multiple) {  
             my @resIds = $self->{NAV_HASH}->{'ids_' . $resUrl};  
         }  
     }  
     my $resId = $self->{NAV_HASH}->{'ids_' . $resUrl};      my $resId = $self->{NAV_HASH}->{'ids_' . $resUrl};
     if (!$resId) { return ''; }      if (!$resId) { return ''; }
     if ($multiple) {      if ($multiple) {
         my @resources = ();          my @resources = ();
         my @resIds = split (/,/, $resId);          my @resIds = split (/,/, $resId);
         foreach my $id (@resIds) {          foreach my $id (@resIds) {
             if ($id) {               my $resourceId = $self->getById($id);
                 push(@resources,$self->getById($id));              if ($resourceId) { 
                   push(@resources,$resourceId);
             }              }
         }          }
         return @resources;          return @resources;

Removed from v.1.352  
changed lines
  Added in v.1.354


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