--- loncom/interface/longroup.pm 2008/12/19 20:10:11 1.17 +++ loncom/interface/longroup.pm 2012/04/25 21:22:02 1.28 @@ -1,6 +1,8 @@ # The LearningOnline Network with CAPA # accessor routines used to provide information about course groups # +# $Id: longroup.pm,v 1.28 2012/04/25 21:22:02 raeburn Exp $ +# # Copyright Michigan State University Board of Trustees # # This file is part of the LearningOnline Network with CAPA (LON-CAPA). @@ -28,6 +30,8 @@ package Apache::longroup; use strict; use Apache::lonnet; +use Apache::lonlocal; +use LONCAPA; ############################################### =pod @@ -437,12 +441,12 @@ sub group_changes { sub get_fixed_privs { my $fixedprivs = { - email => {sgm => 1}, - discussion => {vgb => 1}, - chat => {pgc => 1}, - files => {rgf => 1}, - roster => {vgm => 1}, - homepage => {vgh => 1}, + email => {sgm => 1}, + discussion => {vgb => 1}, + chat => {pgc => 1}, + files => {rgf => 1}, + roster => {vgm => 1}, + homepage => {vgh => 1}, }; return $fixedprivs; } @@ -452,9 +456,9 @@ sub get_fixed_privs { sub get_tool_privs { my ($gpterm) = @_; my $toolprivs = { - email => { - sgm => 'Send '.$gpterm.' mail', - sgb => 'Broadcast mail', + email => { + sgm => 'Send '.$gpterm.' message', + sgb => 'Broadcast message', }, discussion => { cgb => 'Create boards', @@ -464,7 +468,7 @@ sub get_tool_privs { vgb => 'View boards', }, chat => { - pgc => 'Chat', + pgc => 'Chat Room', }, files => { rgf => 'Retrieve', @@ -683,6 +687,25 @@ sub get_group_bbinfo { } ############################################### + +sub get_group_link { + my ($cdom,$cnum,$group,$navmap) = @_; + if (ref($navmap)) { + my $symb = 'uploaded/'.$cdom.'/'.$cnum.'/group_folder_'.$group.'.sequence___1___adm/'.$cdom.'/'.$cnum.'/'.$group.'/smppg'; + my $res = $navmap->getBySymb($symb); + my $link; + if (ref($res)) { + $link = $res->link(); + $link .= (($link=~/\?/)?'&':'?').'symb='.$res->shown_symb(); + } else { + $link = '/adm/'.$cdom.'/'.$cnum.'/'.$group.'/smppg'; + } + return $link; + } + return; +} + +############################################### 1;