Diff for /loncom/interface/longroup.pm between versions 1.16 and 1.17

version 1.16, 2008/05/01 16:26:29 version 1.17, 2008/12/19 20:10:11
Line 643  sub get_bbfolder_url { Line 643  sub get_bbfolder_url {
   
 sub get_group_bbinfo {  sub get_group_bbinfo {
     my ($cdom,$cnum,$group,$boardurl) = @_;      my ($cdom,$cnum,$group,$boardurl) = @_;
       my @groupboards = ();
       my %boardshash = ();
     my $navmap = Apache::lonnavmaps::navmap->new();      my $navmap = Apache::lonnavmaps::navmap->new();
     my @groupboards;      if (defined($navmap)) {
     my %boardshash;          my $grpbbmap = &get_bbfolder_url($cdom,$cnum,$group);
     my $grpbbmap = &get_bbfolder_url($cdom,$cnum,$group);          if ($grpbbmap) {
     if ($grpbbmap) {              my $bbfolderres = $navmap->getResourceByUrl($grpbbmap);
         my $bbfolderres = $navmap->getResourceByUrl($grpbbmap);              if ($bbfolderres) {
         if ($bbfolderres) {                  my @boards = $navmap->retrieveResources($bbfolderres,undef,0,0);
             my @boards = $navmap->retrieveResources($bbfolderres,undef,0,0);                  foreach my $res (@boards) {
             foreach my $res (@boards) {                      my $url = $res->src();
                 my $url = $res->src();                      if ($url =~ m|^(/adm/\Q$cdom\E/\Q$cnum\E/\d+/bulletinboard)|) {
                 if ($url =~ m|^(/adm/\Q$cdom\E/\Q$cnum\E/\d+/bulletinboard)|) {                          if ($boardurl) {
                     if ($boardurl) {                              if ($boardurl =~ /^\Q$1\E/) {
                         if ($boardurl =~ /^\Q$1\E/) {                                  push(@groupboards,$res->symb());
                             push(@groupboards,$res->symb());                                  $boardshash{$res->symb()} = {
                             $boardshash{$res->symb()} = {  
                                                         title => $res->title(),                                                          title => $res->title(),
                                                         url   => $res->src(),                                                          url   => $res->src(),
                                                         };                                                              };
                             last;                                  last;
                         }                              }
                     } else {                          } else {
                         push(@groupboards,$res->symb());                              push(@groupboards,$res->symb());
                         $boardshash{$res->symb()} = {                              $boardshash{$res->symb()} = {
                                                       title => $res->title(),                                                        title => $res->title(),
                                                       url   => $res->src(),                                                        url   => $res->src(),
                                                     };                                                          };
                           }
                     }                      }
                 }                  }
             }              }
         }          }
           undef($navmap);
       } else {
           &Apache::lonnet::logthis('Retrieval of group boards failed - could not create navmap object for group: '.$group.' in course: '.$cdom.':'.$cnum);
     }      }
     undef($navmap);  
     return (\@groupboards,\%boardshash);      return (\@groupboards,\%boardshash);
 }  }
   

Removed from v.1.16  
changed lines
  Added in v.1.17


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