--- loncom/interface/longroup.pm 2006/07/08 00:52:45 1.9 +++ loncom/interface/longroup.pm 2006/07/17 15:07:26 1.10 @@ -439,8 +439,8 @@ sub get_tool_privs { discussion => { cgb => 'Create boards', pgd => 'Post', - pag => 'Anon. posts', - rgi => 'Get identities', + egp => 'Edit own posts', + dgp => 'Hide/Delete any post', vgb => 'View boards', }, chat => { @@ -454,7 +454,8 @@ sub get_tool_privs { agf => 'Control Access', }, roster => { - vgm => 'View', + vgm => 'Basic Display', + vmd => 'Detailed Display', }, homepage => { vgh => 'View page', @@ -519,7 +520,7 @@ sub group_memberlist { $current{$user}{'status'} = 'active'; $member_nums{'active'} ++; } - if (@userprivs > 0) { + if ((@userprivs > 0) && (ref($fixedprivs) eq 'HASH')) { foreach my $tool (sort(keys(%{$fixedprivs}))) { foreach my $priv (keys(%{$$fixedprivs{$tool}})) { if (grep/^$priv$/,@userprivs) { @@ -530,7 +531,7 @@ sub group_memberlist { } $hastools = 1; } - if (@{$available} > 0) { + if ((ref($available) eq 'ARRAY') && (@{$available} > 0)) { if (@{$current{$user}{currtools}} > 0) { if ("@{$available}" ne "@{$current{$user}{currtools}}") { foreach my $tool (@{$available}) { @@ -565,7 +566,7 @@ sub group_memberlist { } } } - return (\%current,$hastools,$addtools,\%member_nums); + return (\%current,\%member_nums,$hastools,$addtools); } ############################################### @@ -621,7 +622,7 @@ sub get_bbfolder_url { ############################################### sub get_group_bbinfo { - my ($cdom,$cnum,$group) = @_; + my ($cdom,$cnum,$group,$boardurl) = @_; my $navmap = Apache::lonnavmaps::navmap->new(); my @groupboards; my %boardshash; @@ -632,12 +633,23 @@ sub get_group_bbinfo { my @boards = $navmap->retrieveResources($bbfolderres,undef,0,0); foreach my $res (@boards) { my $url = $res->src(); - if ($url =~ m|^/adm/\Q$cdom\E/\Q$cnum\E/\d+/bulletinboard|) { - push(@groupboards,$res->symb()); - $boardshash{$res->symb()} = { - title => $res->title(), - url => $res->src(), - }; + if ($url =~ m|^(/adm/\Q$cdom\E/\Q$cnum\E/\d+/bulletinboard)|) { + if ($boardurl) { + if ($boardurl =~ /^\Q$1\E/) { + push(@groupboards,$res->symb()); + $boardshash{$res->symb()} = { + title => $res->title(), + url => $res->src(), + }; + last; + } + } else { + push(@groupboards,$res->symb()); + $boardshash{$res->symb()} = { + title => $res->title(), + url => $res->src(), + }; + } } } }