--- loncom/interface/loncoursegroups.pm 2009/05/07 16:09:55 1.98 +++ loncom/interface/loncoursegroups.pm 2010/01/25 22:19:55 1.101.4.1 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursegroups.pm,v 1.98 2009/05/07 16:09:55 bisitz Exp $ +# $Id: loncoursegroups.pm,v 1.101.4.1 2010/01/25 22:19:55 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(''); - } - if ((@{$unavailable} > 3) && (@{$unavailable}%2)) { - $r->print(''); + $r->print(''.&mt('Unavailable for assignment:').''); + $r->print('
    '.$$functions{$$unavailable[$j]}. - '   
    '); + $r->print(''); } + my $quota_text=&mt('[_1] Mb',$quota); my $granu_text=&mt($granularity); $r->print(<<"END"); @@ -2314,9 +2298,9 @@ sub default_privileges { &Apache::lonhtmlcommon::row_title($lt{'func'},undef, 'LC_groups_functionality')); my @tableHeader; - foreach my $key (sort(keys(%{$functions}))){ - push (@tableHeader,&mt(${$functions}{$key})); - } + if ((ref($functions) eq 'HASH') && (ref($tools) eq 'ARRAY')) { + @tableHeader = map { $functions->{$_}; } @{$tools}; + } $r->print(join('', @tableHeader)); $r->print(&Apache::lonhtmlcommon::row_closure(1)); my $fixed = ''; @@ -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 ++; @@ -3012,7 +2995,7 @@ sub member_privileges_form { } } } - $r->print('
     '); + $r->print(' '); } } $r->print('');