--- loncom/interface/loncoursegroups.pm 2006/06/30 22:38:26 1.34
+++ loncom/interface/loncoursegroups.pm 2006/07/02 17:08:42 1.36
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursegroups.pm,v 1.34 2006/06/30 22:38:26 albertel Exp $
+# $Id: loncoursegroups.pm,v 1.36 2006/07/02 17:08:42 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -438,47 +438,9 @@ sub group_administration {
}
}
- my %toolprivs =
- (
- email => {
- sgm => 'Send '.$gpterm.' mail',
- sgb => 'Broadcast mail',
- },
- discussion => {
- cgb => 'Create boards',
- pgd => 'Post',
- pag => 'Anon. posts',
- rgi => 'Get identities',
- vgb => 'View boards',
- },
- chat => {
- pgc => 'Chat',
- },
- files => {
- rgf => 'Retrieve',
- ugf => 'Upload',
- mgf => 'Modify',
- dgf => 'Delete',
- agf => 'Control Access',
- },
- roster => {
- vgm => 'View',
- },
- homepage => {
- vgh => 'View page',
- mgh => 'Modify page',
- },
- );
+ my $toolprivs = &Apache::longroup::get_tool_privs($gpterm);
- my %fixedprivs =
- (
- email => {sgm => 1},
- discussion => {vgb => 1},
- chat => {pgc => 1},
- files => {rgf => 1},
- roster => {vgm => 1},
- homepage => {vgh => 1},
- );
+ my $fixedprivs = &Apache::longroup::get_fixed_privs();
my %elements =
(
@@ -686,8 +648,8 @@ sub group_administration {
}
my @currtools = ();
if (@userprivs > 0) {
- foreach my $tool (sort(keys(%fixedprivs))) {
- foreach my $priv (keys(%{$fixedprivs{$tool}})) {
+ foreach my $tool (sort(keys(%{$fixedprivs}))) {
+ foreach my $priv (keys(%{$$fixedprivs{$tool}})) {
if (grep/^$priv$/,@userprivs) {
push(@currtools,$tool);
last;
@@ -757,8 +719,8 @@ sub group_administration {
&& ($specificity eq 'Yes')) {
foreach my $user (sort(keys(%usertools))) {
foreach my $tool (keys(%{$usertools{$user}})) {
- foreach my $priv (keys(%{$toolprivs{$tool}})) {
- unless (exists($fixedprivs{$tool}{$priv})) {
+ foreach my $priv (keys(%{$$toolprivs{$tool}})) {
+ unless (exists($$fixedprivs{$tool}{$priv})) {
$elements{$action}{$state}{'userpriv_'.$priv} = 'checkbox';
}
}
@@ -868,7 +830,7 @@ function changeSort(caller) {
("$crumbtitle Manager"));
&display_control($r,$cdom,$cnum,$tabcol,$action,$state,$page,
\%sectioncount,$groupname,$description,$functions,
- \@tools,\%toolprivs,\%fixedprivs,$startdate,$enddate,
+ \@tools,$toolprivs,$fixedprivs,$startdate,$enddate,
\%users,\%userdata,$idx,\%memchg,\%usertools,
$function,$view_permission,$manage_permission,
\%stored,$granularity,$quota,$specificity,\@types,\@roles,
@@ -1780,7 +1742,7 @@ sub pick_new_members {
if (@{$available} > 0) {
if ($granularity eq 'Yes') {
$r->print('
- |
+ |
'.&mt('All:').' ');
foreach my $tool (@{$available}) {
$r->print(' |