--- loncom/interface/longroup.pm 2009/01/30 16:13:04 1.19 +++ loncom/interface/longroup.pm 2010/02/23 14:18:12 1.24 @@ -1,6 +1,8 @@ # The LearningOnline Network with CAPA # accessor routines used to provide information about course groups # +# $Id: longroup.pm,v 1.24 2010/02/23 14:18:12 raeburn Exp $ +# # Copyright Michigan State University Board of Trustees # # This file is part of the LearningOnline Network with CAPA (LON-CAPA). @@ -29,6 +31,7 @@ package Apache::longroup; use strict; use Apache::lonnet; use Apache::lonlocal; +use LONCAPA; ############################################### =pod @@ -438,7 +441,7 @@ sub group_changes { sub get_fixed_privs { my $fixedprivs = { - communication => {sgm => 1}, + email => {sgm => 1}, discussion => {vgb => 1}, chat => {pgc => 1}, files => {rgf => 1}, @@ -453,7 +456,7 @@ sub get_fixed_privs { sub get_tool_privs { my ($gpterm) = @_; my $toolprivs = { - communication => { + email => { sgm => 'Send '.$gpterm.' message', sgb => 'Broadcast message', }, @@ -465,7 +468,7 @@ sub get_tool_privs { vgb => 'View boards', }, chat => { - pgc => 'Chat', + pgc => 'Chat Room', }, files => { rgf => 'Retrieve', @@ -684,6 +687,20 @@ 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 = $res->link(); + $link .= (($link=~/\?/)?'&':'?').'symb='.$res->shown_symb(); + return $link; + } + return; +} + +############################################### 1;