--- loncom/interface/loncoursegroups.pm 2010/01/26 03:26:02 1.101.4.2 +++ loncom/interface/loncoursegroups.pm 2009/11/16 14:07:57 1.105 @@ -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.105 2009/11/16 14:07:57 bisitz 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(' -
'.$lt{'setf'}.' +
'.$lt{'setf'}.' @@ -2338,9 +2337,9 @@ sub default_privileges { &Apache::lonhtmlcommon::row_title($lt{'func'},undef, 'LC_groups_functionality')); my @tableHeader; - if ((ref($functions) eq 'HASH') && (ref($tools) eq 'ARRAY')) { - @tableHeader = map { $functions->{$_}; } @{$tools}; - } + foreach my $key (sort(keys(%{$functions}))){ + push (@tableHeader,&mt($functions->{$key})); + } $r->print(join('', @tableHeader)); $r->print(&Apache::lonhtmlcommon::row_closure(1)); my $fixed = ''; @@ -2557,7 +2556,7 @@ sub current_membership { $r->print(' -
'.$lt{'curf'}.' +
'.$lt{'curf'}.'    @@ -2715,7 +2714,7 @@ sub check_uncheck_buttons { $r->print('
- '.$title.' + '.$title.' @@ -2795,7 +2794,7 @@ sub change_privs_form { sub add_members_form { my ($r,$cdom,$cnum,$action,$formname,$page,$startdate,$enddate,$groupname, $description,$granularity,$quota,$sectioncount,$tools,$functions, - $stored,$states,$navbuttons,$gpterm,$ucgpterm,$crstype)=@_; + $stored,$states,$navbuttons,$gpterm,$ucgpterm,$crstype)=@_; $r->print('
'); my @available = (); my @unavailable = (); @@ -3015,7 +3014,7 @@ sub member_privileges_form { $r->print(''); } $r->print( - '
'.&mt($$toolprivs{$tool}{$priv}).'' + '
'.&mt($$toolprivs{$tool}{$priv}).'' .'' .' ' @@ -3299,8 +3298,8 @@ sub write_group_data { } else { if ($crstype eq 'Community') { $error = &mt("An error occurred while setting parameters '. - 'for Discussion Boards folder: '. - 'Could not retrieve community information"); + 'for Discussion Boards folder: '. + 'Could not retrieve community information"); } else { $error = &mt("An error occurred while setting parameters '. 'for Discussion Boards folder: '. @@ -3555,8 +3554,8 @@ sub process_membership { $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 {