--- loncom/interface/loncoursegroups.pm 2006/07/07 15:54:15 1.39 +++ loncom/interface/loncoursegroups.pm 2006/07/07 16:48:21 1.40 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursegroups.pm,v 1.39 2006/07/07 15:54:15 albertel Exp $ +# $Id: loncoursegroups.pm,v 1.40 2006/07/07 16:48:21 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1182,24 +1182,13 @@ sub general_settings_form { $toolprivs,$fixedprivs,$sectioncount,$stored,$states,$navbuttons, $rowColor1,$rowColor2,$gpterm,$ucgpterm,$crstype) = @_; my ($nexttext,$prevtext); - $r->print('
- -'); &groupsettings_options($r,$tabcol,$functions,$action,$formname,$stored,1, $gpterm,$ucgpterm,$crstype); - $r->print(' - - - '); &access_date_settings($r,$tabcol,$action,$formname,$stored,2,$gpterm, $ucgpterm); - $r->print(' - - - '); if ($action eq 'create') { - &membership_options($r,$action,$formname,$tabcol,$sectioncount,3, - $gpterm,$ucgpterm); + &membership_options($r,$action,$formname,$sectioncount,3,$gpterm, + $ucgpterm); $nexttext = $$navbuttons{'gtns'}; } else { my @available = (); @@ -1209,10 +1198,6 @@ sub general_settings_form { &privilege_specificity($r,$tabcol,$rowColor1,$rowColor2,$action, 3,$tools,$stored,$toolprivs,$fixedprivs, \@available,$formname,$gpterm,$ucgpterm); - $r->print(' - - - '); &mapping_options($r,$action,$formname,$page,$tabcol,$sectioncount, $states,$stored,$navbuttons,4,5,$rowColor1, $rowColor2,$gpterm,$ucgpterm,$crstype); @@ -1221,8 +1206,6 @@ sub general_settings_form { $prevtext = $$navbuttons{'gtpp'}; &display_navbuttons($r,$formname,$$states{$action}[$page-1],$prevtext, $$states{$action}[$page+1],$nexttext); - $r->print(' -
 
 
 
'); return; } @@ -1241,7 +1224,7 @@ sub groupsettings_options { "to different $gpterm members?", ); my ($crsquota,$freespace,$maxposs) = &get_quota_constraints($action,$stored); - &topic_bar($r,$tabcol,$image,$lt{'gnde'}); + &topic_bar($r,$image,$lt{'gnde'}); $r->print('   @@ -1358,7 +1341,7 @@ sub get_quota_constraints { } sub membership_options { - my ($r,$action,$state,$tabcol,$sectioncount,$image,$gpterm,$ucgpterm) = @_; + my ($r,$action,$state,$sectioncount,$image,$gpterm,$ucgpterm) = @_; my $crstype = &Apache::loncommon::course_type(); my %lt = &Apache::lonlocal::texthash( 'pipa' => 'Pick parameters to generate membership list', @@ -1385,12 +1368,9 @@ sub membership_options { my @sections = keys(%{$sectioncount}); - &topic_bar($r,$tabcol,$image,$lt{'pipa'}); + &topic_bar($r,$image,$lt{'pipa'}); $r->print(' - -   - - '.$lt{'gmem'}.'
'.$lt{'picr'}); + '.$lt{'gmem'}.'
'.$lt{'picr'}); if ($action eq 'create') { $r->print($lt{'meof'}.'
'.$lt{'ifno'}.'
'.$lt{'asub'}); } else { @@ -1399,34 +1379,28 @@ sub membership_options { $r->print('

- +
- - - '); + + '); if (@sections >0) { $r->print(' - - - '); + '); } - $r->print(''); + $r->print(''); + $r->print(' - '); } $r->print(' -
'.$lt{'acty'}.' '.$lt{'coro'}.''.$lt{'acty'}.''.$lt{'coro'}.' '.$lt{'cose'}.' '.$lt{'cose'}.'
'); $r->print(&Apache::lonhtmlcommon::status_select_row(\%status_types)); - $r->print(' '); $r->print(&Apache::lonhtmlcommon::role_select_row(\@roles)); if (@sections > 0) { @sections = sort {$a cmp $b} @sections; unshift(@sections,'none'); # Put 'no sections' next unshift(@sections,'all'); # Put 'all' at the front of the list - $r->print(' '. + $r->print(''. §ions_selection(\@sections,'sectionpick').'
- - '); + '); return; } @@ -1468,7 +1442,7 @@ sub access_date_settings { } my ($start_table,$end_table) = &date_setting_table ($starttime,$endtime,$formname); - &topic_bar($r,$tabcol,$image,$lt{'sten'}); + &topic_bar($r,$image,$lt{'sten'}); $r->print('   @@ -1497,17 +1471,9 @@ sub choose_members_form { \@regexps)); my $earlyout = &validate_groupname($groupname,$action,$cdom,$cnum,$gpterm, $ucgpterm,$crstype); - $r->print(' - - - - '); &display_navbuttons($r,$formname,$$states{$action}[$page-1], $$navbuttons{'gtps'}); - $r->print('
  -'); if ($earlyout) { - $r->print($earlyout.'
'); return; } my ($specimg,$memimg); @@ -1515,10 +1481,9 @@ sub choose_members_form { my @unavailable = (); &check_tools($functions,$tools,\@available,\@unavailable); if ($action eq 'create') { - &print_current_settings($r,$action,$tabcol,$rowColor1,$rowColor2, - $functions,$startdate,$enddate,$groupname, - $description,$granularity,$quota,\@available, - \@unavailable,$gpterm,$ucgpterm); + &print_current_settings($r,$action,$functions,$startdate,$enddate, + $groupname,$description,$granularity,$quota, + \@available,\@unavailable,$gpterm,$ucgpterm); $specimg = 4; $memimg = 5; } else { @@ -1553,7 +1518,6 @@ sub choose_members_form { &display_navbuttons($r,$formname,$$states{$action}[$page-1], $$navbuttons{'gtps'}); } - $r->print(''); return; } @@ -1596,9 +1560,8 @@ sub check_tools { } sub print_current_settings { - my ($r,$action,$tabcol,$rowColor1,$rowColor2,$functions,$startdate,$enddate, - $groupname,$description,$granularity,$quota,$available,$unavailable, - $gpterm,$ucgpterm) = @_; + my ($r,$action,$functions,$startdate,$enddate,$groupname,$description, + $granularity,$quota,$available,$unavailable,$gpterm,$ucgpterm) = @_; my %lt = &Apache::lonlocal::texthash( grna => "$ucgpterm Name", @@ -1620,36 +1583,31 @@ sub print_current_settings { } else { $showend = &Apache::lonlocal::locallocaltime($enddate); } - $r->print(''); if ($action eq 'create') { $r->print(' - - -'); +'); } - $r->print(' - @@ -1917,12 +1870,7 @@ sub privilege_specificity { } } } - &topic_bar($r,$tabcol,$img,$lt{'uprv'}); - $r->print(' - - - - - - - '); +

+
+'); } else { $r->print(''); } if ($totaloptionalprivs) { - $r->print(' - - - - - - - - - - - - -'); return; } @@ -2189,19 +2117,18 @@ sub change_members_form {
'.$lt{'ygrs'}.' +
'.$lt{'ygrs'}.'
'.$lt{'tfwa'}.' -
'); - $r->print(&Apache::lonhtmlcommon::start_pick_box()); + $r->print(&Apache::loncommon::start_data_table('LC_course_group_status'). + &Apache::loncommon::start_data_table_header_row()); $r->print(' -
- - - - - - - - - - - - + + + + + + +'); + $r->print(&Apache::loncommon::end_data_table_header_row(). + &Apache::loncommon::start_data_table_row('LC_data_table_dense')); + $r->print(' + + - END - $r->print(&Apache::lonhtmlcommon::end_pick_box()); - $r->print('
'.$lt{'grna'}.''.$lt{'desc'}.''.$lt{'grfn'}.''.$lt{'gran'}.''.$lt{'quot'}.''.$lt{'dfac'}.'
'.$groupname.''.$description.''.$lt{'grna'}.''.$lt{'desc'}.''.$lt{'grfn'}.''.$lt{'gran'}.''.$lt{'quot'}.''.$lt{'dfac'}.''.$groupname.''.$description.' '); if (@{$available} > 0) { - $r->print('Available: + $r->print('Available: '); my $rowcell = int(@{$available}/2) + @{$available}%2; for (my $i=0; $i<@{$available}; $i++) { @@ -1658,8 +1616,8 @@ sub print_current_settings { $r->print(''); } } - $r->print(''); + $r->print(''); } if ((@{$available} > 3) && (@{$available}%2)) { $r->print(''); @@ -1667,7 +1625,7 @@ sub print_current_settings { $r->print('
'.$$functions{$$available[$i]}. - ' '.$$functions{$$available[$i]}. + '   

'); } if (@{$unavailable} > 0) { - $r->print('Unavailable: + $r->print('Unavailable: '); my $rowcell = int(@{$unavailable}/2) + @{$unavailable}%2; for (my $j=0; $j<@{$unavailable}; $j++) { @@ -1676,8 +1634,8 @@ sub print_current_settings { $r->print(''); } } - $r->print(''); + $r->print(''); } if ((@{$unavailable} > 3) && (@{$unavailable}%2)) { $r->print(''); @@ -1686,19 +1644,14 @@ sub print_current_settings { } $r->print(<<"END"); - - - + + - -
'.$$functions{$$unavailable[$j]}. - ' '.$$functions{$$unavailable[$j]}. + '   $lt{'difn'} - $granularity$quota Mb$lt{'stda'} $showstart
- $lt{'enda'} $showend
+
$lt{'difn'} $granularity$quota Mb$lt{'stda'} $showstart
+ $lt{'enda'} $showend
-

'); + $r->print(&Apache::loncommon::end_data_table_row(). + &Apache::loncommon::end_data_table()); return; } @@ -1741,7 +1694,7 @@ sub pick_new_members { $r->print(&check_uncheck_tools($r,$available)); } } - &topic_bar($r,$tabcol,$img,$lt{'gpme'}); + &topic_bar($r,$img,$lt{'gpme'}); if (keys(%members) > 0) { $r->print('
  - '); + &topic_bar($r,$img,$lt{'uprv'}); if ((($action eq 'create') && (@{$available} > 0)) || (($action eq 'modify') && ($formname eq 'change_settings'))) { my %specific = ( @@ -1948,21 +1896,14 @@ sub privilege_specificity { } if ($totaloptionalprivs) { $r->print(' -


- -
 
 '.$lt{'plin'}); + $r->print($lt{'plin'}); if ($action eq 'create') { $r->print(' '.$lt{'thwi'}); } @@ -1973,24 +1914,15 @@ sub privilege_specificity { $r->print('('.&mt('if enabled below').').'); } $r->print('

-
 '); +
'); &check_uncheck_buttons($r,$formname,'defpriv',$lt{'oppr'}); $r->print('
-
 
 
'); } else { - $r->print('
 '.$lt{'algm'}.'

'); + $r->print($lt{'algm'}.'

'); } &default_privileges($r,$action,$tabcol,$rowColor1,$rowColor2, $tools,$toolprivs,$fixedprivs,$available); @@ -2013,10 +1945,6 @@ sub privilege_specificity { $toolprivs,\@defprivs); } } - $r->print(' -
'); - &topic_bar($r,$tabcol,1,$lt{'grse'}); + &topic_bar($r,1,$lt{'grse'}); $r->print(' '); - &topic_bar($r,$tabcol,2,$lt{'mogm'}); + &topic_bar($r,2,$lt{'mogm'}); $r->print(' @@ -2474,7 +2401,7 @@ sub change_privs_form { $nexttext = $$navbuttons{'mose'}; } $r->print('
  '); - &print_current_settings($r,$action,$tabcol,$rowColor1,$rowColor2, - $functions,$startdate,$enddate,$groupname, - $description,$granularity,$quota,\@available, - \@unavailable,$gpterm,$ucgpterm); + &print_current_settings($r,$action,$functions,$startdate,$enddate, + $groupname,$description,$granularity,$quota, + \@available,\@unavailable,$gpterm,$ucgpterm); $r->print('
 
 
'); - &topic_bar($r,$tabcol,3,&mt('Members to delete or expire')); + &topic_bar($r,3,&mt('Members to delete or expire')); my $exp_or_del = 0; if (ref($$memchg{'deletion'}) eq 'ARRAY') { if (@{$$memchg{'deletion'}} > 0) { @@ -2503,7 +2430,7 @@ sub change_privs_form { ''); } - &topic_bar($r,$tabcol,4,&mt('[_1] member privileges',$ucgpterm)); + &topic_bar($r,4,&mt('[_1] member privileges',$ucgpterm)); my $numchgs = &member_privileges_form($r,$tabcol,$action,$formname,$tools, $toolprivs,$fixedprivs,$userdata, @@ -2526,34 +2453,18 @@ sub add_members_form { my ($r,$tabcol,$action,$formname,$page,$startdate,$enddate,$groupname, $description,$granularity,$quota,$sectioncount,$tools,$functions, $stored,$states,$navbuttons,$rowColor1,$rowColor2,$gpterm,$ucgpterm)=@_; - $r->print('
-
 
- - - - - - - '); - - &membership_options($r,$action,$formname,$tabcol,$sectioncount,1,$gpterm, - $ucgpterm); + &print_current_settings($r,$action,$functions,$startdate,$enddate, + $groupname,$description,$granularity,$quota, + \@available,\@unavailable,$gpterm,$ucgpterm); + &membership_options($r,$action,$formname,$sectioncount,1,$gpterm,$ucgpterm); my $nexttext = $$navbuttons{'gtns'}; my $prevtext = $$navbuttons{'gtpp'}; &display_navbuttons($r,$formname,$$states{$action}[$page-1],$prevtext, $$states{$action}[$page+1],$nexttext); - $r->print(' -
  -'); + $r->print('
'); my @available = (); my @unavailable = (); &check_tools($functions,$tools,\@available,\@unavailable); - &print_current_settings($r,$action,$tabcol,$rowColor1,$rowColor2, - $functions,$startdate,$enddate,$groupname, - $description,$granularity,$quota,\@available, - \@unavailable,$gpterm,$ucgpterm); - $r->print(' -
 
'); return; } @@ -2579,7 +2490,7 @@ sub choose_privs_form { } $r->print('
'); - &topic_bar($r,$tabcol,6,&mt('[_1] member privileges',$ucgpterm)); + &topic_bar($r,6,&mt('[_1] member privileges',$ucgpterm)); &member_privileges_form($r,$tabcol,$action,$formname,$tools,$toolprivs, $fixedprivs,$userdata,$usertools,$idx,undef, @@ -3271,7 +3182,7 @@ sub automapping { if (exists($$stored{'autodrop'})) { $drop = $$stored{'autodrop'}; } - &topic_bar($r,$tabcol,$image,$$lt{'endi'}); + &topic_bar($r,$image,$$lt{'endi'}); $r->print(' @@ -3325,7 +3236,7 @@ sub mapping_settings { unshift(@sections,'none'); # Put 'no sections' next unshift(@sections,'all'); # Put 'all' at the front of the list } - &topic_bar($r,$tabcol,$image,$$lt{'pirs'}); + &topic_bar($r,$image,$$lt{'pirs'}); $r->print(' @@ -3788,22 +3699,12 @@ sub validate_groupname { } sub topic_bar { - my ($r,$tabcol,$imgnum,$title) = @_; + my ($r,$imgnum,$title) = @_; $r->print(' - - - - - - - - - +
+   + '.$title.' +
'); return; }
 
 
  - -   - - '.$title.' -