Diff for /loncom/interface/longroup.pm between versions 1.19 and 1.27

version 1.19, 2009/01/30 16:13:04 version 1.27, 2010/11/13 04:45:17
Line 1 Line 1
 # The LearningOnline Network with CAPA  # The LearningOnline Network with CAPA
 # accessor routines used to provide information about course groups   # accessor routines used to provide information about course groups 
 #  #
   # $Id$
   #
 # Copyright Michigan State University Board of Trustees  # Copyright Michigan State University Board of Trustees
 #  #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).  # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
Line 29  package Apache::longroup; Line 31  package Apache::longroup;
 use strict;  use strict;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::lonlocal;  use Apache::lonlocal;
   use LONCAPA;
   
 ###############################################  ###############################################
 =pod  =pod
Line 288  sub group_changes { Line 291  sub group_changes {
         }          }
        if (@changegroups > 0) {         if (@changegroups > 0) {
             my %currpriv;              my %currpriv;
             my %roleshash = &Apache::lonnet::dump('roles',$udom,$uname,$cid);              my $extra = &Apache::lonnet::freeze_escape({'skipcheck' => 1});
               my %roleshash = &Apache::lonnet::dump('roles',$udom,$uname,$cid,undef,$extra);
     if (my $tmp = &Apache::lonnet::error(%roleshash)) {      if (my $tmp = &Apache::lonnet::error(%roleshash)) {
                 &Apache::lonnet::logthis('Error retrieving roles: '.$tmp.                  &Apache::lonnet::logthis('Error retrieving roles: '.$tmp.
                                          ' for '.$uname.':'.$udom);                                           ' for '.$uname.':'.$udom);
Line 438  sub group_changes { Line 442  sub group_changes {
   
 sub get_fixed_privs {  sub get_fixed_privs {
     my $fixedprivs = {      my $fixedprivs = {
                       communication          => {sgm => 1},                        email          => {sgm => 1},
                       discussion     => {vgb => 1},                        discussion     => {vgb => 1},
                       chat           => {pgc => 1},                        chat           => {pgc => 1},
                       files          => {rgf => 1},                        files          => {rgf => 1},
Line 453  sub get_fixed_privs { Line 457  sub get_fixed_privs {
 sub get_tool_privs {  sub get_tool_privs {
     my ($gpterm) = @_;      my ($gpterm) = @_;
     my $toolprivs = {      my $toolprivs = {
         communication    => {          email    => {
             sgm => 'Send '.$gpterm.' message',              sgm => 'Send '.$gpterm.' message',
             sgb => 'Broadcast message',              sgb => 'Broadcast message',
         },          },
Line 465  sub get_tool_privs { Line 469  sub get_tool_privs {
             vgb => 'View boards',              vgb => 'View boards',
         },          },
         chat       => {          chat       => {
             pgc => 'Chat',              pgc => 'Chat Room',
         },          },
         files      => {          files      => {
             rgf => 'Retrieve',              rgf => 'Retrieve',
Line 684  sub get_group_bbinfo { Line 688  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;  1;
   

Removed from v.1.19  
changed lines
  Added in v.1.27


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