--- loncom/interface/loncoursegroups.pm 2006/07/07 17:11:04 1.41 +++ loncom/interface/loncoursegroups.pm 2006/07/07 21:20:25 1.48 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursegroups.pm,v 1.41 2006/07/07 17:11:04 albertel Exp $ +# $Id: loncoursegroups.pm,v 1.48 2006/07/07 21:20:25 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -59,8 +59,6 @@ sub handler { &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['action','refpage','state','groupname','branch']); - my $function = &Apache::loncommon::get_users_function(); - my $tabcol = &Apache::loncommon::designparm($function.'.tabbg'); my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; @@ -91,9 +89,6 @@ sub handler { $idx{uname} = &Apache::loncoursedata::CL_SNAME(); $idx{section} = &Apache::loncoursedata::CL_SECTION(); - my $rowColor1 = "#dddddd"; - my $rowColor2 = "#eeeeee"; - my $action = $env{'form.action'}; my $state = $env{'form.state'}; if ((!defined($action)) || ($action eq 'view')) { @@ -103,10 +98,10 @@ sub handler { } if ($action eq 'create' || $action eq 'modify' || $action eq 'view') { if ($view_permission || $manage_permission) { - &group_administration($r,$action,$state,$cdom,$cnum,$function, - $tabcol,\%functions,\%idx,$view_permission, - $manage_permission,$rowColor1,$rowColor2, - $gpterm,$ucgpterm,$crstype); + &group_administration($r,$action,$state,$cdom,$cnum, + \%functions,\%idx,$view_permission, + $manage_permission,$gpterm,$ucgpterm, + $crstype); } else { $r->print(&mt('You do not have [_1] administration '. 'privileges in this [_2]',$gpterm,lc($crstype))); @@ -348,9 +343,8 @@ END } sub group_administration { - my ($r,$action,$state,$cdom,$cnum,$function,$tabcol,$functions,$idx, - $view_permission,$manage_permission,$rowColor1,$rowColor2,$gpterm, - $ucgpterm,$crstype) = @_; + my ($r,$action,$state,$cdom,$cnum,$functions,$idx,$view_permission, + $manage_permission,$gpterm,$ucgpterm,$crstype) = @_; my %sectioncount = (); my @tools = (); my @types = (); @@ -865,14 +859,14 @@ function changeSort(caller) { {text=>"$trail{$action}{$state}"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs ("$crumbtitle Manager")); - &display_control($r,$cdom,$cnum,$tabcol,$action,$state,$page, + &display_control($r,$cdom,$cnum,$action,$state,$page, \%sectioncount,$groupname,$description,$functions, \@tools,$toolprivs,$fixedprivs,$startdate,$enddate, \%users,\%userdata,$idx,\%memchg,\%usertools, - $function,$view_permission,$manage_permission, + $view_permission,$manage_permission, \%stored,$granularity,$quota,$specificity,\@types,\@roles, - \@sections,\%states,\%navbuttons,$rowColor1,$rowColor2, - $gpterm,$ucgpterm,$crstype); + \@sections,\%states,\%navbuttons,$gpterm,$ucgpterm, + $crstype); last; } else { if (($state eq 'result') && ($i > 0)) { @@ -960,41 +954,38 @@ sub retrieve_settings { } sub display_control { - my ($r,$cdom,$cnum,$tabcol,$action,$state,$page,$sectioncount,$groupname, + my ($r,$cdom,$cnum,$action,$state,$page,$sectioncount,$groupname, $description,$functions,$tools,$toolprivs,$fixedprivs,$startdate, - $enddate,$users,$userdata,$idx,$memchg,$usertools,$function, + $enddate,$users,$userdata,$idx,$memchg,$usertools, $view_permission,$manage_permission,$stored,$granularity,$quota, - $specificity,$types,$roles,$sections,$states,$navbuttons,$rowColor1, - $rowColor2,$gpterm,$ucgpterm,$crstype) = @_; + $specificity,$types,$roles,$sections,$states,$navbuttons, + $gpterm,$ucgpterm,$crstype) = @_; if ($action eq 'create') { if ($state eq 'pick_name') { - &general_settings_form($r,$cdom,$cnum,$action,$tabcol,$state,$page, + &general_settings_form($r,$cdom,$cnum,$action,$state,$page, $functions,$tools,$toolprivs,$fixedprivs, $sectioncount,$stored,$states,$navbuttons, - $rowColor1,$rowColor2,$gpterm,$ucgpterm, - $crstype); + $gpterm,$ucgpterm,$crstype); } elsif ($state eq 'pick_members') { - &choose_members_form($r,$cdom,$cnum,$tabcol,$action,$state,$page, + &choose_members_form($r,$cdom,$cnum,$action,$state,$page, $groupname,$description,$granularity,$quota, $startdate,$enddate,$tools,$fixedprivs, $toolprivs,$functions,$users,$userdata,$idx, - $stored,$states,$navbuttons,$rowColor1, - $rowColor2,$gpterm,$ucgpterm,$crstype); + $stored,$states,$navbuttons,$gpterm,$ucgpterm, + $crstype); } elsif ($state eq 'pick_privs') { - &choose_privs_form($r,$cdom,$cnum,$tabcol,$action,$state,$page, + &choose_privs_form($r,$cdom,$cnum,$action,$state,$page, $startdate,$enddate,$tools,$functions, $toolprivs,$fixedprivs,$userdata,$usertools, $idx,$states,$stored,$sectioncount,$navbuttons, - $rowColor1,$rowColor2,$gpterm,$ucgpterm, - $crstype); + $gpterm,$ucgpterm,$crstype); } elsif ($state eq 'result') { - &process_request($r,$cdom,$cnum,$tabcol,$action,$state,$page, + &process_request($r,$cdom,$cnum,$action,$state,$page, $groupname,$description,$specificity,$userdata, $startdate,$enddate,$tools,$functions, $toolprivs,$usertools,$idx,$types,$roles, $sections,$states,$navbuttons,$memchg, - $sectioncount,$stored,$rowColor1,$rowColor2, - $gpterm,$ucgpterm,$crstype); + $sectioncount,$stored,$gpterm,$ucgpterm,$crstype); } } elsif ($action eq 'modify') { my $groupname = $env{'form.groupname'}; @@ -1005,53 +996,48 @@ sub display_control { } elsif ($state eq 'pick_task') { &modify_menu($r,$groupname,$page,$gpterm); } elsif ($state eq 'change_settings') { - &general_settings_form($r,$cdom,$cnum,$action,$tabcol,$state,$page, + &general_settings_form($r,$cdom,$cnum,$action,$state,$page, $functions,$tools,$toolprivs,$fixedprivs, $sectioncount,$stored,$states,$navbuttons, - $rowColor1,$rowColor2,$gpterm,$ucgpterm, - $crstype); + $gpterm,$ucgpterm,$crstype); } elsif ($state eq 'change_members') { - &change_members_form($r,$cdom,$cnum,$tabcol,$action,$state,$page, + &change_members_form($r,$cdom,$cnum,$action,$state,$page, $groupname,$description,$startdate,$enddate, $tools,$fixedprivs,$functions,$users, $userdata,$granularity,$quota,$specificity, - $idx,$states,$navbuttons,$rowColor1,$rowColor2, - $gpterm,$ucgpterm); + $idx,$states,$navbuttons,$gpterm,$ucgpterm); } elsif ($state eq 'add_members') { - &add_members_form($r,$tabcol,$action,$state,$page,$startdate, + &add_members_form($r,$action,$state,$page,$startdate, $enddate,$groupname,$description,$granularity, $quota,$sectioncount,$tools,$functions,$stored, - $states,$navbuttons,$rowColor1,$rowColor2,$gpterm, - $ucgpterm); + $states,$navbuttons,$gpterm,$ucgpterm); } elsif ($state eq 'pick_members') { - &choose_members_form($r,$cdom,$cnum,$tabcol,$action,$state,$page, + &choose_members_form($r,$cdom,$cnum,$action,$state,$page, $groupname,$description,$granularity,$quota, $startdate,$enddate,$tools,$fixedprivs, $toolprivs,$functions,$users,$userdata,$idx, - $stored,$states,$navbuttons,$rowColor1, - $rowColor2,$gpterm,$ucgpterm,$crstype); + $stored,$states,$navbuttons,$gpterm,$ucgpterm, + $crstype); } elsif ($state eq 'pick_privs') { - &choose_privs_form($r,$cdom,$cnum,$tabcol,$action,$state,$page, + &choose_privs_form($r,$cdom,$cnum,$action,$state,$page, $startdate,$enddate,$tools,$functions, $toolprivs,$fixedprivs,$userdata,$usertools, $idx,$states,$stored,$sectioncount,$navbuttons, - $rowColor1,$rowColor2,$gpterm,$ucgpterm,$crstype); + $gpterm,$ucgpterm,$crstype); } elsif ($state eq 'change_privs') { - &change_privs_form($r,$cdom,$cnum,$tabcol,$action,$state,$page, + &change_privs_form($r,$cdom,$cnum,$action,$state,$page, $startdate,$enddate,$tools,$functions, $toolprivs,$fixedprivs,$userdata,$usertools, $memchg,$idx,$states,$stored,$sectioncount, - $navbuttons,$rowColor1,$rowColor2,$gpterm, - $ucgpterm); + $navbuttons,$gpterm,$ucgpterm); } elsif ($state eq 'chgresult' || $state eq 'memresult' || $state eq 'addresult') { - &process_request($r,$cdom,$cnum,$tabcol,$action,$state,$page, + &process_request($r,$cdom,$cnum,$action,$state,$page, $groupname,$description,$specificity,$userdata, $startdate,$enddate,$tools,$functions, $toolprivs,$usertools,$idx,$types,$roles, $sections,$states,$navbuttons,$memchg, - $sectioncount,$stored,$rowColor1,$rowColor2, - $gpterm,$ucgpterm,$crstype); + $sectioncount,$stored,$gpterm,$ucgpterm,$crstype); } } } @@ -1171,18 +1157,21 @@ sub group_members { if ($totalmembers == 0) { $$group_info{$group}{'totalmembers'} = 'None'; } else { - $$group_info{$group}{'totalmembers'} = $active.' - active
'.$previous.' -previous
'.$future.' -future'; + $$group_info{$group}{'totalmembers'} = ''.$active. + ' - active
'.$previous. + ' - previous
'.$future. + ' - future'; } return 'ok'; } sub general_settings_form { - my ($r,$cdom,$cnum,$action,$tabcol,$formname,$page,$functions,$tools, + my ($r,$cdom,$cnum,$action,$formname,$page,$functions,$tools, $toolprivs,$fixedprivs,$sectioncount,$stored,$states,$navbuttons, - $rowColor1,$rowColor2,$gpterm,$ucgpterm,$crstype) = @_; + $gpterm,$ucgpterm,$crstype) = @_; my ($nexttext,$prevtext); - &groupsettings_options($r,$tabcol,$functions,$action,$formname,$stored,1, + &groupsettings_options($r,$functions,$action,$formname,$stored,1, $gpterm,$ucgpterm,$crstype); &access_date_settings($r,$action,$formname,$stored,2,$gpterm,$ucgpterm); if ($action eq 'create') { @@ -1194,12 +1183,12 @@ sub general_settings_form { my @unavailable = (); &check_tools($functions,$tools,\@available,\@unavailable); @{$tools} = sort(keys(%{$functions})); - &privilege_specificity($r,$tabcol,$rowColor1,$rowColor2,$action, - 3,$tools,$stored,$toolprivs,$fixedprivs, - \@available,$formname,$gpterm,$ucgpterm); - &mapping_options($r,$action,$formname,$page,$tabcol,$sectioncount, - $states,$stored,$navbuttons,4,5,$rowColor1, - $rowColor2,$gpterm,$ucgpterm,$crstype); + &privilege_specificity($r,$action,3,$tools,$stored,$toolprivs, + $fixedprivs,\@available,$formname, + $gpterm,$ucgpterm); + &mapping_options($r,$action,$formname,$page,$sectioncount, + $states,$stored,$navbuttons,4,5, + $gpterm,$ucgpterm,$crstype); $nexttext = $$navbuttons{'mose'}; } $prevtext = $$navbuttons{'gtpp'}; @@ -1209,7 +1198,7 @@ sub general_settings_form { } sub groupsettings_options { - my ($r,$tabcol,$functions,$action,$formname,$stored,$image,$gpterm, + my ($r,$functions,$action,$formname,$stored,$image,$gpterm, $ucgpterm,$crstype) = @_; my %lt = &Apache::lonlocal::texthash( 'gdat' => "$ucgpterm open and close dates", @@ -1225,9 +1214,9 @@ sub groupsettings_options { my ($crsquota,$freespace,$maxposs) = &get_quota_constraints($action,$stored); &topic_bar($r,$image,$lt{'gnde'}); $r->print(' - +
- + - + - + END my $numitems = keys(%{$functions}); my $halfnum = int($numitems/2); @@ -1280,7 +1269,7 @@ END - + - - - - - - - - - - - - - - - + + - END - &member_privs_entries($r,$tabcol,$rowColor1,$rowColor2, - $usertools,$toolprivs,$fixedprivs, + $r->print(&Apache::loncommon::end_data_table_header_row()); + &member_privs_entries($r,$usertools,$toolprivs,$fixedprivs, $userdata,$idx,\@showtools,\@defprivs, \@excluded); - $r->print(''); - $r->print(&Apache::lonhtmlcommon::end_pick_box()); - $r->print(' - - - -'); + $r->print(&Apache::loncommon::end_data_table()); } else { - $r->print(' - - '); - &mapping_settings($r,$tabcol,$rowColor1,$rowColor2,$sectioncount,\%lt, - $stored,$img2,$crstype); + &automapping($r,$action,$stored,\%lt,$img1); + &mapping_settings($r,$sectioncount,\%lt,$stored,$img2,$crstype); return; } sub automapping { - my ($r,$action,$tabcol,$stored,$lt,$image) = @_; + my ($r,$action,$stored,$lt,$image) = @_; my $add = 'off'; my $drop = 'off'; if (exists($$stored{'autoadd'})) { @@ -3154,52 +3042,24 @@ sub automapping { } &topic_bar($r,$image,$$lt{'endi'}); $r->print(' - - - - - - - - - - - - - - - - - - - - - - -'); + $r->print('

'.$$lt{'mapr'}); } sub mapping_settings { - my ($r,$tabcol,$rowColor1,$rowColor2,$sectioncount,$lt,$stored,$image, - $crstype) = @_; + my ($r,$sectioncount,$lt,$stored,$image,$crstype) = @_; my @sections = keys(%{$sectioncount}); if (@sections > 0) { @sections = sort {$a cmp $b} @sections; @@ -3207,23 +3067,17 @@ sub mapping_settings { unshift(@sections,'all'); # Put 'all' at the front of the list } &topic_bar($r,$image,$$lt{'pirs'}); - $r->print(' - - - '); if (@sections > 0) { - $r->print(''."\n"); + $r->print(''); } - my $rowNum = 0; - my $rowColor; + $r->print(&Apache::loncommon::end_data_table_header_row()."\n"); foreach my $role (@roles) { my $plrole=&Apache::lonnet::plaintext($role,$crstype); my $sections_sel; @@ -3238,33 +3092,25 @@ sub mapping_settings { ''; } } - if ($rowNum %2 == 1) { - $rowColor = $rowColor1; - } else { - $rowColor = $rowColor2; - } - $r->print(''.$sections_sel.''); - $rowNum ++; + $r->print(&Apache::loncommon::start_data_table_row(). + ''.$sections_sel. + &Apache::loncommon::end_data_table_row()); } foreach my $role (sort(keys(%customroles))) { my $sections_sel; if (@sections > 0) { - $sections_sel = ''; + $sections_sel = + ''; } - if ($rowNum %2 == 1) { - $rowColor = $rowColor1; - } else { - $rowColor = $rowColor2; - } - $r->print(''. - $sections_sel.''); - $rowNum ++; + $r->print(&Apache::loncommon::start_data_table_row(). + ''. + $sections_sel. + &Apache::loncommon::end_data_table_row()); } - $r->print(&Apache::lonhtmlcommon::end_pick_box()); + $r->print(&Apache::loncommon::end_data_table()); return; } @@ -3321,10 +3167,8 @@ sub modify_menu { } sub member_privs_entries { - my ($r,$tabcol,$rowColor1,$rowColor2,$usertools,$toolprivs, - $fixedprivs,$userdata,$idx,$showtools,$defprivs,$excluded) = @_; - my $rowColor; - my $rowNum = 0; + my ($r,$usertools,$toolprivs,$fixedprivs,$userdata,$idx,$showtools, + $defprivs,$excluded) = @_; foreach my $user (sort(keys(%{$usertools}))) { if (defined($excluded)) { if (ref($excluded) eq 'ARRAY') { @@ -3334,19 +3178,14 @@ sub member_privs_entries { } } my ($uname,$udom) = split(/:/,$user); - if ($rowNum %2 == 1) { - $rowColor = $rowColor1; - } else { - $rowColor = $rowColor2; - } - $r->print(' + $r->print(&Apache::loncommon::start_data_table_row().' '); foreach my $tool (@{$showtools}) { if (exists($$usertools{$user}{$tool})) { - $r->print('
'.$lt{'gnam'}.':'.$lt{'gnam'}.': '); if ($action eq 'create') { @@ -1240,13 +1229,13 @@ sub groupsettings_options {
$lt{'desc'}:$lt{'desc'}:
$lt{'func'}:$lt{'func'}:
'.&mt('Granularity:').''.&mt('Granularity:').' '.$lt{'doyo'}.'  '); if ($action eq 'modify') { $r->print('  ('.&mt('Currently set to "[_1]"', @@ -1290,7 +1279,7 @@ END
'.&mt('Disk quota: ').''); + '.&mt('Disk quota: ').''); if ($action eq 'create') { $r->print(&mt('If you enable the file repository for the [_1], allocate a disk quota.',$gpterm)); } else { @@ -1443,10 +1432,10 @@ sub access_date_settings { } sub choose_members_form { - my ($r,$cdom,$cnum,$tabcol,$action,$formname,$page,$groupname,$description, + my ($r,$cdom,$cnum,$action,$formname,$page,$groupname,$description, $granularity,$quota,$startdate,$enddate,$tools,$fixedprivs,$toolprivs, $functions,$users,$userdata,$idx,$stored,$states,$navbuttons, - $rowColor1,$rowColor2,$gpterm,$ucgpterm,$crstype) = @_; + $gpterm,$ucgpterm,$crstype) = @_; my @regexps = ('user_','userpriv_','sec_'); my %origmembers; $r->print(&Apache::lonhtmlcommon::echo_form_input( @@ -1456,6 +1445,7 @@ sub choose_members_form { my $earlyout = &validate_groupname($groupname,$action,$cdom,$cnum,$gpterm, $ucgpterm,$crstype); if ($earlyout) { + $r->print($earlyout); &display_navbuttons($r,$formname,$$states{$action}[$page-1], $$navbuttons{'gtps'}); return; @@ -1487,13 +1477,12 @@ sub choose_members_form { } } } - &privilege_specificity($r,$tabcol,$rowColor1,$rowColor2,$action, - $specimg,$tools,$stored,$toolprivs, + &privilege_specificity($r,$action,$specimg,$tools,$stored,$toolprivs, $fixedprivs,\@available,$formname,$gpterm,$ucgpterm); - my $newusers = &pick_new_members($r,$action,$formname,$tabcol,$rowColor1, - $rowColor2,\@available,$idx,$stored, - $memimg,$users,$userdata,$granularity, - \%origmembers,$gpterm,$ucgpterm); + my $newusers = &pick_new_members($r,$action,$formname,\@available,$idx, + $stored,$memimg,$users,$userdata, + $granularity,\%origmembers,$gpterm, + $ucgpterm); if ($newusers || $action eq 'create') { &display_navbuttons($r,$formname,$$states{$action}[$page-1], $$navbuttons{'gtps'},$$states{$action}[$page+1], @@ -1507,6 +1496,7 @@ sub choose_members_form { sub display_navbuttons { my ($r,$formname,$prev,$prevtext,$next,$nexttext) = @_; + $r->print('
'); if ($prev) { $r->print(' '); } + $r->print('
'); } sub check_tools { @@ -1558,7 +1549,7 @@ sub print_current_settings { } if ($action eq 'create') { $r->print(' -
'.$lt{'ygrs'}.' +
'.$lt{'ygrs'}.'
'.$lt{'tfwa'}.'
'); } @@ -1581,7 +1572,7 @@ sub print_current_settings { '); if (@{$available} > 0) { $r->print('Available: - '); +
'); my $rowcell = int(@{$available}/2) + @{$available}%2; for (my $i=0; $i<@{$available}; $i++) { if (@{$available} > 3) { @@ -1599,7 +1590,7 @@ sub print_current_settings { } if (@{$unavailable} > 0) { $r->print('Unavailable: -
'); +
'); my $rowcell = int(@{$unavailable}/2) + @{$unavailable}%2; for (my $j=0; $j<@{$unavailable}; $j++) { if (@{$unavailable} > 3) { @@ -1629,9 +1620,8 @@ END } sub pick_new_members { - my ($r,$action,$formname,$tabcol,$rowColor1,$rowColor2,$available,$idx, - $stored,$img,$users,$userdata,$granularity,$origmembers,$gpterm, - $ucgpterm) = @_; + my ($r,$action,$formname,$available,$idx,$stored,$img,$users,$userdata, + $granularity,$origmembers,$gpterm,$ucgpterm) = @_; my %lt = &Apache::lonlocal::texthash( 'gpme' => "$ucgpterm membership", 'addm' => 'Add members', @@ -1670,59 +1660,48 @@ sub pick_new_members { &topic_bar($r,$img,$lt{'gpme'}); if (keys(%members) > 0) { $r->print(' - - - - - - - - - - - '); + $r->print(&Apache::lonhtmlcommon::start_pick_box('LC_group_priv_box'). + &Apache::lonhtmlcommon::row_title($lt{'func'},undef, + 'LC_groups_functionality')); + $r->print(join(''."\n"); - $r->print(&Apache::lonhtmlcommon::end_pick_box()); + $r->print(&Apache::lonhtmlcommon::row_title($lt{'fixp'},undef, + 'LC_groups_fixed'). + $fixed. + &Apache::lonhtmlcommon::row_closure(1)); + $r->print(&Apache::lonhtmlcommon::row_title($lt{'oppr'},undef, + 'LC_groups_optional'). + $dynamic. + &Apache::lonhtmlcommon::end_pick_box()); $r->print('
'); return; + } sub display_defprivs { - my ($r,$tabcol,$rowColor1,$rowColor2,$tools,$toolprivs,$defprivs) = @_; + my ($r,$tools,$toolprivs,$defprivs) = @_; + my $function = &Apache::loncommon::get_users_function(); + my $tabcol = &Apache::loncommon::designparm($function.'.tabbg'); + my $rowColor1 = "#dddddd"; + my $rowColor2 = "#eeeeee"; my %lt = &Apache::lonlocal::texthash( 'priv' => 'Privileges', 'func' => 'Function', @@ -2008,7 +1967,7 @@ sub display_defprivs { @{$currprivs{$tool}} = (); foreach my $priv (sort(keys(%{$$toolprivs{$tool}}))) { if (ref($defprivs) eq 'ARRAY') { - if (grep/^\Q$priv\E$/,@{$defprivs}) { + if (grep(/^\Q$priv\E$/,@{$defprivs})) { push(@{$currprivs{$tool}},$priv); } } @@ -2064,10 +2023,10 @@ sub display_defprivs { sub change_members_form { - my ($r,$cdom,$cnum,$tabcol,$action,$formname,$page,$groupname,$description, + my ($r,$cdom,$cnum,$action,$formname,$page,$groupname,$description, $startdate,$enddate,$tools,$fixedprivs,$functions,$users,$userdata, - $granularity,$quota,$specificity,$idx,$states,$navbuttons,$rowColor1, - $rowColor2,$gpterm,$ucgpterm) = @_; + $granularity,$quota,$specificity,$idx,$states,$navbuttons,$gpterm, + $ucgpterm) = @_; my %lt = &Apache::lonlocal::texthash( grse => "$ucgpterm settings", mogm => "Modify $gpterm membership", @@ -2085,38 +2044,22 @@ sub change_members_form { my $prevtext = $$navbuttons{'gtpp'}; $r->print('
-
  '); &check_uncheck_buttons($r,$formname,'member',$lt{'addm'}); if (@{$available} > 0 && $granularity eq 'Yes') { - $r->print(''); + + '); } $r->print('
+ $r->print('
'.$lt{'setf'}.' +    -
-
 
  '); - $r->print(&Apache::lonhtmlcommon::start_pick_box()); + $r->print(&Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_header_row()); $r->print(' - - - - - - - - + '); + $r->print(''); } - $r->print(''); + $r->print(&Apache::loncommon::end_data_table_header_row()); if (@{$available} > 0) { if ($granularity eq 'Yes') { - $r->print(' + $r->print(&Apache::loncommon::start_data_table_row('LC_data_table_dense LC_data_table_highlight').' - '); + $r->print(''); } } my %Sortby = (); @@ -1741,27 +1720,22 @@ sub pick_new_members { push(@{$Sortby{$members{$user}[$$idx{fullname}]}},$user); } } - my $rowNum = 0; - my $rowColor; foreach my $key (sort(keys(%Sortby))) { foreach my $user (@{$Sortby{$key}}) { - if ($rowNum %2 == 1) { - $rowColor = $rowColor1; - } else { - $rowColor = $rowColor2; - } my $id = $members{$user}[$$idx{id}]; my $fullname = $members{$user}[$$idx{fullname}]; my $udom = $members{$user}[$$idx{udom}]; my $uname = $members{$user}[$$idx{uname}]; my $section = $members{$user}[$$idx{section}]; - $r->print(''. - ''); + $r->print(&Apache::loncommon::start_data_table_row('LC_data_table_dense'). + ''. + ''. + ''. + ''. + ''. + ''); if (@{$available} > 0) { - $r->print(''); + $r->print(''); } - $r->print(''."\n"); - $rowNum ++; + $r->print(&Apache::loncommon::end_data_table_row()."\n"); } } - $r->print(&Apache::lonhtmlcommon::end_pick_box()); - $r->print(' - - '); + $r->print(&Apache::loncommon::end_data_table()); } else { - $r->print(' - - - - '); } return $newusers; } sub privilege_specificity { - my ($r,$tabcol,$rowColor1,$rowColor2,$action,$img,$tools,$stored, - $toolprivs,$fixedprivs,$available,$formname,$gpterm,$ucgpterm) = @_; + my ($r,$action,$img,$tools,$stored,$toolprivs,$fixedprivs,$available, + $formname,$gpterm,$ucgpterm) = @_; my %lt = &Apache::lonlocal::texthash ( 'uprv' => 'User privileges', 'frty' => 'For each type of functionality you have chosen to include, '. @@ -1897,8 +1859,8 @@ sub privilege_specificity { } else { $r->print($lt{'algm'}.'

'); } - &default_privileges($r,$action,$tabcol,$rowColor1,$rowColor2, - $tools,$toolprivs,$fixedprivs,$available); + &default_privileges($r,$action,$tools,$toolprivs,$fixedprivs, + $available); } else { if ($action eq 'create') { $r->print($lt{'asyo'}); @@ -1914,88 +1876,85 @@ sub privilege_specificity { $r->print($lt{'sall'}); } $r->print(' '.$lt{'defp'}.'

'); - &display_defprivs($r,$tabcol,$rowColor1,$rowColor2,$tools, - $toolprivs,\@defprivs); + &display_defprivs($r,$tools,$toolprivs,\@defprivs); } } return; } sub default_privileges { - my ($r,$action,$tabcol,$rowColor1,$rowColor2,$tools,$toolprivs, - $fixedprivs,$available) = @_; + my ($r,$action,$tools,$toolprivs,$fixedprivs,$available) = @_; my %lt = &Apache::lonlocal::texthash( 'addp' => 'Additional privileges', 'fixp' => 'Fixed privileges', 'oppr' => 'Optional privileges', 'func' => 'Function', ); - $r->print(&Apache::loncommon::start_data_table(). - &Apache::loncommon::start_data_table_header_row()); - $r->print(' - - - - - - - -
'.&mt('Add?').''.&mt('Name').''.&mt('Username').' - '.&mt('Domain').'IDSection'.&mt('Add?').' + '.&mt('Name').' + '.&mt('Username').' + '.&mt('Domain').' + '.&mt('ID').' + '.&mt('Section').' '); if (@{$available} > 0) { - $r->print(''.$lt{'func'}.''.$lt{'func'}.'
 '.&mt('All:').' '); + '.&mt('All:').' '); foreach my $tool (@{$available}) { $r->print('   '); } - $r->print('
- '. - $fullname.''.$uname.''. - $udom.''.$id.''.$section.''.$fullname.''.$uname.''.$udom.''.$id.''.$section.''. + $r->print(''. '       '); foreach my $tool (@{$available}) { if ($granularity eq 'Yes') { @@ -1772,37 +1746,25 @@ sub pick_new_members { $tool.'" value="'.$user.'" />'.$tool.'   '); } } - $r->print('
  -'); if ($totalusers > 0) { $r->print($lt{'nnew'}.'

'.$lt{'yoma'}); } else { $r->print($lt{'nome'}); } - $r->print(' -
'.$lt{'func'}.'
'.$lt{'fixp'}.'
'.$lt{'oppr'}.'
-
',@{$tools})); + $r->print(&Apache::lonhtmlcommon::row_closure(1)); + my $fixed = ''; + my $dynamic = ''; foreach my $tool (@{$tools}) { - $r->print(' - - - - - '); my $privcount = 0; - my $fixed = ''; - my $dynamic = ''; + if ($dynamic ne '') { + $dynamic .= ' - '); + $dynamic .= '
'.$tool.'
'; + } + $dynamic .= ''; foreach my $priv (sort(keys(%{$$toolprivs{$tool}}))) { if (exists($$fixedprivs{$tool}{$priv})) { + if ($fixed ne '') { + $fixed .= ' - '."\n"; + '."\n"; } $dynamic .= ''."\n"; } } - if ($dynamic eq '') { - $dynamic = ''."\n"; + if ($privcount == 0) { + $dynamic .= ''."\n"; } if ($privcount < 3) { - $dynamic .= ' - - '."\n"; + $dynamic .= ' + '."\n"; } elsif ($privcount%2) { $dynamic = ''."\n"; } - $r->print(' - - - '."\n".$dynamic.''."\n".'
'; + } $fixed .= ''.$$toolprivs{$tool}{$priv}.' '; if ($action eq 'modify') { - if (grep/^$tool$/,@{$available}) { + if (grep(/^$tool$/,@{$available})) { $fixed .= ''.&mt('(on)').' '; } else { $fixed .= ''.&mt('(off)').' '; } } } else { - $privcount ++; + $privcount++; if ($privcount == 3) { $dynamic .= '
NoneNone
   
'.$fixed.'
'."\n".'
'; } - $r->print('
'); &topic_bar($r,1,$lt{'grse'}); - $r->print(' - - - '); &topic_bar($r,2,$lt{'mogm'}); - $r->print(' - - - '); + ¤t_membership($r,$cdom,$cnum,$formname,$groupname,\@available, + \@unavailable,$fixedprivs,$granularity,$specificity); &display_navbuttons($r,$formname,$$states{$action}[$page-1],$prevtext, $$states{$action}[$page+1],$nexttext); - $r->print('
  -'); &print_current_settings($r,$action,$functions,$startdate,$enddate, $groupname,$description,$granularity,$quota, \@available,\@unavailable,$gpterm,$ucgpterm); -$r->print(' -
 
  -'); - ¤t_membership($r,$cdom,$cnum,$formname,$tabcol,$rowColor1, - $rowColor2,$groupname,\@available,\@unavailable, - $fixedprivs,$granularity,$specificity); - $r->print('
'); return; } sub current_membership { - my ($r,$cdom,$cnum,$formname,$tabcol,$rowColor1,$rowColor2,$groupname, - $available,$unavailable,$fixedprivs,$granularity,$specificity) = @_; + my ($r,$cdom,$cnum,$formname,$groupname,$available,$unavailable, + $fixedprivs,$granularity,$specificity) = @_; my %membership = &Apache::lonnet::get_group_membership($cdom,$cnum, $groupname); my %lt = &Apache::lonlocal::texthash( @@ -2138,9 +2081,6 @@ sub current_membership { $available); if (keys(%{$current}) > 0) { $r->print(' -
  '); if ($num_expire) { @@ -2177,51 +2117,41 @@ sub current_membership { $r->print(<<"END");
-
 
 
  +
END - $r->print(&Apache::lonhtmlcommon::start_pick_box()); + $r->print(&Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_header_row()); $r->print(<<"END"); - - - - - - - - - + + + + + + + END my $colspan = 0; if ($hastools) { - $r->print(''); - $colspan ++; + $r->print(''); + $colspan++; } if ($addtools) { - $r->print(''); - $colspan ++; + $r->print(''); + $colspan++; } - $r->print(''); + $r->print(&Apache::loncommon::end_data_table_header_row()); if ($colspan) { if ($granularity eq 'Yes') { - $r->print(' + $r->print(&Apache::loncommon::start_data_table_row('LC_data_table_dense LC_data_table_highlight').' - '); + $r->print(''); } } my %Sortby = (); @@ -2238,23 +2168,16 @@ END push(@{$Sortby{$$current{$user}{fullname}}},$user); } } - my $rowNum = 0; - my $rowColor; foreach my $key (sort(keys(%Sortby))) { foreach my $user (@{$Sortby{$key}}) { - if ($rowNum %2 == 1) { - $rowColor = $rowColor1; - } else { - $rowColor = $rowColor2; - } my $id = $$current{$user}{id}; my $fullname = $$current{$user}{fullname}; my $udom = $$current{$user}{udom}; my $uname = $$current{$user}{uname}; my $start = $$current{$user}{start}; my $end = $$current{$user}{end}; - $r->print(' - - '); + '. + ''. + ''. + ''. + ''. + ''. + ''); if ($hastools) { - $r->print(''); + $r->print(''); } if ($addtools) { - $r->print(''); + $r->print(''); } - $r->print(''."\n"); - $rowNum ++; + $r->print(&Apache::loncommon::end_data_table_row()."\n"); } } - $r->print(&Apache::lonhtmlcommon::end_pick_box()); - $r->print(' - - '); + $r->print(&Apache::loncommon::end_data_table()); } return; } @@ -2336,26 +2257,26 @@ sub check_uncheck_buttons { my ($r,$formname,$field,$title,$colspan) = @_; $r->print(' '); } sub change_privs_form { - my ($r,$cdom,$cnum,$tabcol,$action,$formname,$page,$startdate,$enddate, - $tools,$functions,$toolprivs,$fixedprivs,$userdata,$usertools, - $memchg,$idx,$states,$stored,$sectioncount,$navbuttons,$rowColor1, - $rowColor2,$gpterm,$ucgpterm) = @_; + my ($r,$cdom,$cnum,$action,$formname,$page,$startdate,$enddate, + $tools,$functions,$toolprivs,$fixedprivs,$userdata,$usertools, + $memchg,$idx,$states,$stored,$sectioncount,$navbuttons,$gpterm, + $ucgpterm) = @_; my @regexps = ('userpriv_'); my $nexttext; my %lt = &Apache::lonlocal::texthash( @@ -2370,7 +2291,6 @@ sub change_privs_form { } else { $nexttext = $$navbuttons{'mose'}; } - $r->print('
$lt{'actn'}$lt{'name'}$lt{'usnm'} - $lt{'doma'}ID$lt{'stda'}$lt{'enda'}$lt{'actn'}$lt{'name'}$lt{'usnm'}$lt{'doma'}ID$lt{'stda'}$lt{'enda'}'.$lt{'curf'}.''.$lt{'curf'}.'Additional Functionality'.&mt('Additional Functionality').'
 '.&mt('All:'). + '.&mt('All:'). ' '); foreach my $tool (@{$available}) { $r->print('   '); + ' value="'.$tool.'" />'.''.$tool.'   '); } - $r->print('
'); + $r->print(&Apache::loncommon::start_data_table_row('LC_data_table_dense').' + '); if ($$current{$user}{changestate} eq 'reenable') { $r->print(''); } $r->print(' - '. - $fullname.''.$uname.''. - $udom.''.$id.''.$start. - ''.$end.''.$fullname.''.$uname.''. $udom.''.$id.''.$start.''.$end.''. + $r->print(''. '      '); foreach my $tool (@{$$current{$user}{currtools}}) { if ($granularity eq 'Yes') { @@ -2299,10 +2224,10 @@ END } $r->print('   '); } - $r->print(''); + $r->print(''); if ($granularity eq 'Yes') { foreach my $tool (@{$$current{$user}{newtools}}) { $r->print('
-
'.$title.' +    -
+
'); &topic_bar($r,3,&mt('Members to delete or expire')); my $exp_or_del = 0; if (ref($$memchg{'deletion'}) eq 'ARRAY') { @@ -2380,7 +2300,7 @@ sub change_privs_form { $r->print('
  • '.$$userdata{$user}[$$idx{fullname}]. ' ('.$user.')
  • '); } - $r->print(''); + $r->print(''); $exp_or_del += @{$$memchg{'deletion'}}; } } @@ -2391,23 +2311,20 @@ sub change_privs_form { $r->print('
  • '.$$userdata{$user}[$$idx{fullname}]. ' ('.$user.')
  • '); } - $r->print(''); + $r->print(''); $exp_or_del += @{$$memchg{'expire'}}; } } if (!$exp_or_del) { - $r->print(''); + $r->print($lt{'nome'}.'
    '); } &topic_bar($r,4,&mt('[_1] member privileges',$ucgpterm)); - my $numchgs = &member_privileges_form($r,$tabcol,$action,$formname,$tools, + my $numchgs = &member_privileges_form($r,$action,$formname,$tools, $toolprivs,$fixedprivs,$userdata, $usertools,$idx,$memchg,$states, - $stored,$rowColor1,$rowColor2, - $gpterm); - $r->print(''); + $stored,$gpterm); my $prevtext = $$navbuttons{'gtps'}; if ($numchgs || $exp_or_del) { &display_navbuttons($r,$formname,$$states{$action}[$page-1],$prevtext, @@ -2415,14 +2332,13 @@ sub change_privs_form { } else { &display_navbuttons($r,$formname,$$states{$action}[$page-1],$prevtext); } - $r->print('
     
     
     '.$lt{'nome'}. - '
     
     
    '); return; } sub add_members_form { - my ($r,$tabcol,$action,$formname,$page,$startdate,$enddate,$groupname, + my ($r,$action,$formname,$page,$startdate,$enddate,$groupname, $description,$granularity,$quota,$sectioncount,$tools,$functions, - $stored,$states,$navbuttons,$rowColor1,$rowColor2,$gpterm,$ucgpterm)=@_; + $stored,$states,$navbuttons,$gpterm,$ucgpterm)=@_; $r->print('
    '); my @available = (); my @unavailable = (); @@ -2439,10 +2355,10 @@ sub add_members_form { } sub choose_privs_form { - my ($r,$cdom,$cnum,$tabcol,$action,$formname,$page,$startdate,$enddate, - $tools,$functions,$toolprivs,$fixedprivs,$userdata,$usertools,$idx, - $states,$stored,$sectioncount,$navbuttons,$rowColor1,$rowColor2, - $gpterm,$ucgpterm,$crstype) = @_; + my ($r,$cdom,$cnum,$action,$formname,$page,$startdate,$enddate, + $tools,$functions,$toolprivs,$fixedprivs,$userdata,$usertools,$idx, + $states,$stored,$sectioncount,$navbuttons,$gpterm,$ucgpterm, + $crstype) = @_; my @regexps = ('userpriv_'); my $nexttext; @@ -2459,27 +2375,24 @@ sub choose_privs_form { $nexttext = $$navbuttons{'adme'}; } - $r->print('
    '); &topic_bar($r,6,&mt('[_1] member privileges',$ucgpterm)); - &member_privileges_form($r,$tabcol,$action,$formname,$tools,$toolprivs, + &member_privileges_form($r,$action,$formname,$tools,$toolprivs, $fixedprivs,$userdata,$usertools,$idx,undef, - $states,$stored,$rowColor1,$rowColor2,$gpterm); + $states,$stored,$gpterm); - $r->print(''); if ($action eq 'create') { if (keys(%{$sectioncount}) > 0) { my $img1 = 7; my $img2 = 8; - &mapping_options($r,$action,$formname,$page,$tabcol,$sectioncount, + &mapping_options($r,$action,$formname,$page,$sectioncount, $states,$stored,$navbuttons,$img1,$img2, - $rowColor1,$rowColor2,$gpterm,$ucgpterm,$crstype); + $gpterm,$ucgpterm,$crstype); } } my $prevtext = $$navbuttons{'gtps'}; &display_navbuttons($r,$formname,$$states{$action}[$page-1],$prevtext, $$states{$action}[$page+1],$nexttext); - $r->print('
     
    '); return; } @@ -2542,9 +2455,8 @@ function uncheckAllTools(formname) { } sub member_privileges_form { - my ($r,$tabcol,$action,$formname,$tools,$toolprivs,$fixedprivs,$userdata, - $usertools,$idx,$memchg,$states,$stored,$rowColor1,$rowColor2, - $gpterm) = @_; + my ($r,$action,$formname,$tools,$toolprivs,$fixedprivs,$userdata, + $usertools,$idx,$memchg,$states,$stored,$gpterm) = @_; my %lt = &Apache::lonlocal::texthash( 'addp' => 'Additional privileges', 'fixp' => 'Fixed privileges', @@ -2605,7 +2517,7 @@ sub member_privileges_form { } $numchgs = @currmembers; if (!$numchgs) { - $r->print('
     '.$lt{'nogm'}); + $r->print($lt{'nogm'}); return $numchgs; } } @@ -2621,17 +2533,14 @@ sub member_privileges_form { my %total; if (keys(%{$usertools}) > 1) { $r->print(' -
      - +
    '); foreach my $tool (@{$tools}) { if (@{$showboxes{$tool}} > 0) { $r->print(''); - $r->print(''); + $r->print('
    '); - $r->print(''); } } - $r->print('
    '. + $r->print(''. + ''); my $privcount = 0; foreach my $priv (@{$showboxes{$tool}}) { @@ -2669,59 +2578,44 @@ sub member_privileges_form { $r->print('
    '. $tool.'
     
     
    '); } - $r->print('
     '); - $r->print(&Apache::lonhtmlcommon::start_pick_box()); + $r->print(&Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_header_row()); $r->print(<<"END"); -
    $lt{'full'}$lt{'user'}$lt{'full'}$lt{'user'} $lt{'doma'} $lt{'addp'}
     
     '.$lt{'forf'}. - '
    '); - &display_defprivs($r,$tabcol,$rowColor1,$rowColor2,$tools, - $toolprivs,\@defprivs); + $r->print($lt{'forf'}.'
    '); + &display_defprivs($r,$tools,$toolprivs,\@defprivs); } } else { if (keys(%{$usertools}) > 0) { - $r->print('
     '.$lt{'algr'}. - '

    '); - &display_defprivs($r,$tabcol,$rowColor1,$rowColor2,$tools, - $toolprivs,\@defprivs); + $r->print($lt{'algr'}.'

    '); + &display_defprivs($r,$tools,$toolprivs,\@defprivs); } else { - $r->print('
     '.$lt{'asno'}. - '
    '); + $r->print($lt{'asno'}.'
    '); } } } else { - $r->print('
     '.$lt{'asng'}); + $r->print($lt{'asng'}); } return $numchgs; } sub process_request { - my ($r,$cdom,$cnum,$tabcol,$action,$state,$page,$groupname,$description, + my ($r,$cdom,$cnum,$action,$state,$page,$groupname,$description, $specificity,$userdata,$startdate,$enddate,$tools,$functions,$toolprivs, $usertools,$idx,$types,$roles,$sections,$states,$navbuttons,$memchg, - $sectioncount,$stored,$rowColor1,$rowColor2,$gpterm,$ucgpterm, - $crstype) = @_; + $sectioncount,$stored,$gpterm,$ucgpterm,$crstype) = @_; $r->print(&Apache::lonhtmlcommon::echo_form_input( ['origin','action','state','page','sortby'])); @@ -3114,9 +3008,8 @@ sub process_membership { } sub mapping_options { - my ($r,$action,$formname,$page,$tabcol,$sectioncount,$states,$stored, - $navbuttons,$img1,$img2,$rowColor1,$rowColor2,$gpterm,$ucgpterm, - $crstype) = @_; + my ($r,$action,$formname,$page,$sectioncount,$states,$stored, + $navbuttons,$img1,$img2,$gpterm,$ucgpterm,$crstype) = @_; my %lt = &Apache::lonlocal::texthash( 'auto' => "Settings for automatic $gpterm enrollment", 'gmma' => "$ucgpterm membership mapping to specific sections/roles", @@ -3132,18 +3025,13 @@ sub mapping_options { 'auex' => "Automatically expire $gpterm membership when roles are removed?", 'mapr' => "Mapping of roles and sections affected by automatic $gpterm enrollment/disenrollment follows scheme chosen below.", ); - &automapping($r,$action,$tabcol,$stored,\%lt,$img1); - $r->print(' -
     
      - '.$$lt{'gmma'}.':
    '.$$lt{'adds'}.'
    '.$$lt{'drops'}.'
    -
     
      + '.$$lt{'gmma'}.':
    '.$$lt{'adds'}.'
    '.$$lt{'drops'}.'

    '.$$lt{'auad'}.':  '); if ($action eq 'modify') { $r->print('    ('.$$lt{'curr'}.' '.$$lt{$add}.')'); } $r->print(' - -
      +
    '.$$lt{'auex'}.':  '); if ($action eq 'modify') { $r->print('    ('.$$lt{'curr'}.' '.$$lt{$drop}.')'); } - $r->print(' -
     
     '.$$lt{'mapr'}.' -
      -'); my @roles = &standard_roles(); my %customroles = &my_custom_roles(); - $r->print(&Apache::lonhtmlcommon::start_pick_box()); + $r->print(&Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_header_row()); $r->print(' -
    '.&mt('Active?').' '.&mt('Role').''.&mt('Sections').'
    '.&mt('Sections').'
    '.$plrole. - '
    '.$plrole. + ''.§ions_selection(\@sections,'sec_'.$role). - ''.§ions_selection(\@sections,'sec_'.$role).'
    '.$role.'
    '.$role.'
    '.$$userdata{$user}[$$idx{fullname}].' '.$uname.' '.$udom.'
    Function
    Fixed
    Optional
    '); + $r->print(''); } else { - $r->print(''); + $r->print(''); } } - $rowNum ++; + $r->print(&Apache::loncommon::end_data_table_row()); } } @@ -3396,11 +3235,11 @@ sub date_setting_table { my $perpetual = ''; - my $table = "
    '.$tool.'
    '); my $privcount = 0; my $fixed = ''; my $dynamic = ''; @@ -3369,10 +3208,10 @@ sub member_privs_entries { } $r->print(''.$dynamic.'
    '.$tool.'
    '.$fixed.'
    '.$tool.'
     
     
    '.$tool.'
     
     
    \n". - ''. + my $table = "
    '.&mt('Start:').'
    \n". + ''. ''. ''."\n". - ''. + ''. ''. ''."\n". "
    '.&mt('Start:').''.$startform.' 
    '.&mt('End:').'
    '.&mt('End:').''.$endform.''.$perpetual.'
    \n"; @@ -3416,23 +3255,23 @@ sub add_group_folder { my ($outcome,$allgrpsmap,$grpmap,$boardsmap,$grppage); my $navmap = Apache::lonnavmaps::navmap->new(); my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/'; - $allgrpsmap = $crspath.'default_0.sequence'; + $allgrpsmap = $crspath.'group_allfolders.sequence'; my $topmap = $navmap->getResourceByUrl($allgrpsmap); undef($navmap); if ($action eq 'create') { - # check if default_0.sequence exists. + # check if group_allfolders.sequence exists. if (!$topmap) { my $grpstitle = &mt('[_1] [_2]',$crstype,$ucgpterm); my $topmap_url = '/'.$env{'course.'.$env{'request.course.id'}.'.url'}; $topmap_url =~ s|/+|/|g; if ($topmap_url =~ m|^/uploaded|) { - $outcome = &map_updater($cdom,$cnum,'default_0.sequence', + $outcome = &map_updater($cdom,$cnum,'group_allfolders.sequence', 'toplevelgroup',$grpstitle,$topmap_url); if ($outcome ne 'ok') { return $outcome; } } else { - $outcome = &mt('Non-standard course - group folder not added.'); + $outcome = &mt('Non-standard course - folder for all groups not added.'); return $outcome; } } @@ -3440,7 +3279,7 @@ sub add_group_folder { $grppage='/adm/'.$cdom.'/'.$cnum.'/'.$groupname.'/grppg'; my $grptitle = &mt('Group homepage').' - '.$description; my ($seqid,$discussions,$disctitle); - my $outcome = &map_updater($cdom,$cnum,'default_'.$now.'.sequence', + my $outcome = &map_updater($cdom,$cnum,'group_folder_'.$groupname.'.sequence', 'grpseq',$grpfolder,$allgrpsmap,$grppage, $grptitle); if ($outcome ne 'ok') { @@ -3449,16 +3288,16 @@ sub add_group_folder { my $pageout = &create_homepage($cdom,$cnum,$groupname,$groupinfo, $tools,$gpterm,$ucgpterm,$now); # Link to folder for bulletin boards - $grpmap = $crspath.'default_'.$now.'.sequence'; + $grpmap = $crspath.'group_folder_'.$groupname.'.sequence'; if (grep/^discussion$/,@{$tools}) { $seqid = $now + 1; $disctitle = &mt('Discussion Boards'); - my $outcome = &map_updater($cdom,$cnum,'default_'.$seqid. + my $outcome = &map_updater($cdom,$cnum,'group_boards_'.$groupname. '.sequence','bbseq',$disctitle,$grpmap); if ($outcome ne 'ok') { return $outcome; } - $boardsmap = $crspath.'default_'.$seqid.'.sequence'; + $boardsmap = $crspath.'group_boards_'.$groupname.'.sequence'; } } else { #modify group folder if status of discussions tools is changed @@ -3635,8 +3474,8 @@ sub validate_groupname { "existing $gpterm", ); - my $exitmsg = ''.$lt{'igna'}.'

    '.$lt{'tgne'}.' "'. - $groupname.'" '; + my $exitmsg = ''.$lt{'igna'}.'

    '. + $lt{'tgne'}.' "'.$groupname.'" '; my $dupmsg = $lt{'grna'}; my $earlyout; if (($groupname eq '') || ($groupname =~ /\W/)) { @@ -3667,8 +3506,9 @@ sub topic_bar { my ($r,$imgnum,$title) = @_; $r->print('
    -   - '.$title.' + '.&mt('Step [_1]',$imgnum).
+	      '  + '.$title.'
    '); return;