--- loncom/interface/loncoursegroups.pm 2010/01/26 03:26:02 1.101.4.2
+++ loncom/interface/loncoursegroups.pm 2009/11/23 14:37:50 1.106
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursegroups.pm,v 1.101.4.2 2010/01/26 03:26:02 raeburn Exp $
+# $Id: loncoursegroups.pm,v 1.106 2009/11/23 14:37:50 wenzelju Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1129,7 +1129,7 @@ sub display_control {
&verify_reenable($r,$groupname,$state,$action,$page,$states,
\%stored,$crstype);
} elsif ($state eq 'result') {
- &reenable_group($r,$cdom,$cnum,$groupname);
+ &reenable_group($r,$cdom,$cnum,$groupname,$crstype);
}
}
}
@@ -1605,7 +1605,7 @@ sub general_settings_form {
&access_date_settings($r,$action,$formname,$stored,2,$gpterm,$ucgpterm);
if ($action eq 'create') {
&membership_options($r,$cdom,$cnum,$action,$formname,$sectioncount,3,
- $gpterm,$ucgpterm);
+ $gpterm,$ucgpterm,$crstype);
$nexttext = $$navbuttons{'gtns'};
} else {
my @available = ();
@@ -1774,6 +1774,7 @@ sub membership_options {
'picr' => 'Pick the criteria to use to build a list of course users from which you will select members of the new group.',
'pica' => 'Pick the criteria to use to build a list of course users from which you will select additional members of the group.',
'ifno' => 'If you do not wish to add members when you first create the group, there is no need to pick any criteria.',
+ 'asub' => 'A subsequent step will also allow you to specify automatic adding/dropping of group members triggered by specified user role and section changes in the course.',
'acty' => 'Access types',
'coro' => 'Course roles',
'cose' => 'Course sections',
@@ -1786,7 +1787,6 @@ sub membership_options {
} else {
$lt{'asub'} = &mt('A subsequent step will also allow you to specify automatic adding/dropping of group members triggered by specified user role and section [_1]changes[_2] in the course.','','');
}
-
my %status_types = (
active => &mt('Currently has access'),
previous => &mt('Previously had access'),
@@ -1805,7 +1805,6 @@ sub membership_options {
$r->print(&Apache::lonhtmlcommon::topic_bar($image,$lt{'pipa'}).'
'.$lt{'gmem'}.'
');
-
if ($action eq 'create') {
$r->print($lt{'picr'}.'
'.$lt{'ifno'}.'
'.$lt{'asub'});
} else {
@@ -2104,7 +2103,7 @@ sub pick_new_members {
&check_uncheck_buttons($r,$formname,'member',$lt{'addm'});
if (@{$available} > 0 && $granularity eq 'Yes') {
$r->print('
'); if ($crstype eq 'Community') { $r->print(&mt("Any currently logged in community users affected by the changes you made" - .' to group membership or privileges for the [_1] group will need to log out' - .' and log back in for their LON-CAPA sessions to reflect these changes.' + .' to group membership or privileges for the [_1] group will need to log out' + .' and log back in for their LON-CAPA sessions to reflect these changes.' ,''.$groupname.'')); } else { @@ -3711,36 +3710,32 @@ sub standard_roles { sub modify_menu { my ($r,$groupname,$page,$gpterm) = @_; my @menu = - ( - { text => "Modify default $gpterm settings", - help => 'Course_Modify_Group', - state => 'change_settings', - branch => 'settings', + ( { categorytitle =>'Group Actions', + items => [ + + { linktext => "Modify default $gpterm settings", + url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=change_settings&branch=settings', + icon => 'grp_settings.png', + alttext => "Modify default $gpterm settings", + permission => '1', + help => 'Course_Modify_Group', }, - { text => 'Modify access, tools and/or privileges for previous, '. - 'future, or current members', + { linktext => 'Modify access, tools and privileges for members', + url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=change_members&branch=members', + icon => 'grp_tools.png', + alttext => 'Modify access, tools and privileges for members', + permission => '1', help => 'Course_Modify_Group_Membership', - state => 'change_members', - branch => 'members', }, - { text => "Add member(s) to the $gpterm", + { linktext => "Add member(s) to the $gpterm", + url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=add_members&branch=adds', + icon => 'grp_add.png', + alttext => "Add member(s) to the $gpterm", + permission => '1', help => 'Course_Group_Add_Members', - state => 'add_members', - branch => 'adds', - }, - ); - my $menu_html = ''; - foreach my $menu_item (@menu) { - $menu_html .= - '
'; - $menu_html.= &mt($menu_item->{'text'}).''; - if (exists($menu_item->{'help'})) { - $menu_html.= - &Apache::loncommon::help_open_topic($menu_item->{'help'}); - } - $menu_html.='
'.$/; - } - $r->print($menu_html); + }]} + ); + $r->print(&Apache::lonhtmlcommon::generate_menu(@menu)); return; } @@ -4233,3 +4228,4 @@ sub check_changes { } 1; +