--- loncom/interface/loncoursegroups.pm 2009/05/07 15:25:37 1.97 +++ loncom/interface/loncoursegroups.pm 2009/09/09 04:31:53 1.103 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursegroups.pm,v 1.97 2009/05/07 15:25:37 bisitz Exp $ +# $Id: loncoursegroups.pm,v 1.103 2009/09/09 04:31:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1440,7 +1440,7 @@ sub header { {'add_entries' => $loaditems,}); my $output = <<"END"; $start_page -
+ END if ($action eq 'create' || $action eq 'modify') { @@ -1888,7 +1888,8 @@ sub choose_members_form { } } &privilege_specificity($r,$action,$specimg,$tools,$stored,$toolprivs, - $fixedprivs,\@available,$formname,$gpterm,$ucgpterm); + $fixedprivs,\@available,$formname,$gpterm,$ucgpterm, + $functions); my $newusers = &pick_new_members($r,$action,$formname,\@available,$idx, $stored,$memimg,$users,$userdata, $granularity,\%origmembers,$gpterm, @@ -1985,42 +1986,25 @@ sub print_current_settings { '.$description.' '); + if (@{$available} > 0) { - $r->print(''.&mt('Available for assignment to members:').''. - ''); - my $rowcell = int(@{$available}/2) + @{$available}%2; + $r->print(''.&mt('Available for assignment to members:').''); + $r->print(''); - } - } - $r->print(''); + $r->print('
  • '.&mt($$functions{$$available[$i]}).'
  • '); } - if ((@{$available} > 3) && (@{$available}%2)) { - $r->print(''); - } - $r->print('
    '.$$functions{$$available[$i]}. - '   

    '); + $r->print(''); } + if (@{$unavailable} > 0) { - $r->print(''.&mt('Unavailable for assignment:').''. - ''); - my $rowcell = int(@{$unavailable}/2) + @{$unavailable}%2; - for (my $j=0; $j<@{$unavailable}; $j++) { - if (@{$unavailable} > 3) { - if ($j==$rowcell) { - $r->print(''); - } - } - $r->print(''); + $r->print(''.&mt('Unavailable for assignment:').''); + $r->print(''); - } - $r->print('
    '.$$functions{$$unavailable[$j]}. - '   
    '); + $r->print(''); } + my $quota_text=&mt('[_1] Mb',$quota); my $granu_text=&mt($granularity); $r->print(<<"END"); @@ -2083,7 +2067,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'}.' @@ -2315,7 +2299,7 @@ sub default_privileges { 'LC_groups_functionality')); my @tableHeader; foreach my $key (sort(keys(%{$functions}))){ - push (@tableHeader,&mt(${$functions}{$key})); + push (@tableHeader,&mt($functions->{$key})); } $r->print(join('', @tableHeader)); $r->print(&Apache::lonhtmlcommon::row_closure(1)); @@ -2533,7 +2517,7 @@ sub current_membership { $r->print(' -
    '.$lt{'curf'}.' +
    '.$lt{'curf'}.'    @@ -2691,7 +2675,7 @@ sub check_uncheck_buttons { $r->print('
    - '.$title.' + '.$title.' @@ -2975,9 +2959,8 @@ sub member_privileges_form { foreach my $tool (@{$tools}) { if (@{$showboxes{$tool}} > 0) { $r->print(''); - $r->print(''. - ''); + $r->print('
    '.&mt($tool).''); + $r->print('
    '. - &mt($tool).'
    '); my $privcount = 0; foreach my $priv (@{$showboxes{$tool}}) { $privcount ++; @@ -2992,7 +2975,7 @@ sub member_privileges_form { $r->print('
    '); } $r->print( - '
    '.&mt($$toolprivs{$tool}{$priv}).'' + '
    '.&mt($$toolprivs{$tool}{$priv}).'' .'' .' ' @@ -3012,7 +2995,7 @@ sub member_privileges_form { } } } - $r->print('
     '); + $r->print('
     '); } } $r->print(''); @@ -3776,17 +3759,19 @@ sub date_setting_table { 'startdate',$starttime); my $endform = &Apache::lonhtmlcommon::date_setter($formname, 'enddate',$endtime); - my $perpetual = - ''; - my $table = "\n". - ''. - ''. - ''."\n". - ''. - ''. - ''."\n". - "
    '.&mt('Start:').''.$startform.' 
    '.&mt('End:').''.$endform.''.$perpetual.'
    \n"; + my $perpetual = ' '; + my $table = &Apache::lonhtmlcommon::start_pick_box() + .&Apache::lonhtmlcommon::row_title(&mt('Start Date')) + .$startform + .&Apache::lonhtmlcommon::row_closure() + .&Apache::lonhtmlcommon::row_title(&mt('End Date')) + .$endform + .$perpetual + .&Apache::lonhtmlcommon::row_closure(1) + .&Apache::lonhtmlcommon::end_pick_box(); return $table; }