+
'.$section_sel.'
';
return $output;
@@ -1875,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,
@@ -1972,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('');
for (my $i=0; $i<@{$available}; $i++) {
- if (@{$available} > 3) {
- if ($i==$rowcell) {
- $r->print(' ');
- }
- }
- $r->print(''.$$functions{$$available[$i]}.
- ' ');
+ $r->print(''.&mt($$functions{$$available[$i]}).' ');
}
- if ((@{$available} > 3) && (@{$available}%2)) {
- $r->print(' ');
- }
- $r->print('
');
+ $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(''.$$functions{$$unavailable[$j]}.
- ' ');
- }
- if ((@{$unavailable} > 3) && (@{$unavailable}%2)) {
- $r->print(' ');
+ $r->print(''.&mt('Unavailable for assignment:').' ');
+ $r->print('');
+ for (my $i=0; $i<@{$unavailable}; $i++) {
+ $r->print(''.&mt($$functions{$$unavailable[$i]}).' ');
}
- $r->print('
');
+ $r->print('');
}
+
my $quota_text=&mt('[_1] Mb',$quota);
my $granu_text=&mt($granularity);
$r->print(<<"END");
@@ -2070,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'}.'
@@ -2169,7 +2166,7 @@ sub pick_new_members {
sub privilege_specificity {
my ($r,$action,$img,$tools,$stored,$toolprivs,$fixedprivs,$available,
- $formname,$gpterm,$ucgpterm) = @_;
+ $formname,$gpterm,$ucgpterm,$functions) = @_;
my %lt = &Apache::lonlocal::texthash (
'uprv' => 'User privileges for collaborative tools',
'frty' => 'For each collaborative tool you have chosen to include, '.
@@ -2266,7 +2263,7 @@ sub privilege_specificity {
$r->print($lt{'algm'}.' ');
}
&default_privileges($r,$action,$tools,$toolprivs,$fixedprivs,
- $available);
+ $available,$functions);
} else {
if ($action eq 'create') {
$r->print($lt{'asyo'});
@@ -2290,7 +2287,7 @@ sub privilege_specificity {
}
sub default_privileges {
- my ($r,$action,$tools,$toolprivs,$fixedprivs,$available) = @_;
+ my ($r,$action,$tools,$toolprivs,$fixedprivs,$available,$functions) = @_;
my %lt = &Apache::lonlocal::texthash(
'addp' => 'Additional privileges',
'fixp' => 'Fixed privileges',
@@ -2299,8 +2296,12 @@ sub default_privileges {
);
$r->print(&Apache::lonhtmlcommon::start_pick_box('LC_group_priv_box').
&Apache::lonhtmlcommon::row_title($lt{'func'},undef,
- 'LC_groups_functionality'));
- $r->print(join(' ',@{$tools}));
+ 'LC_groups_functionality'));
+ my @tableHeader;
+ foreach my $key (sort(keys(%{$functions}))){
+ push (@tableHeader,&mt($functions->{$key}));
+ }
+ $r->print(join(' ', @tableHeader));
$r->print(&Apache::lonhtmlcommon::row_closure(1));
my $fixed = '';
my $dynamic = '';
@@ -2316,7 +2317,7 @@ sub default_privileges {
$fixed .= ' ';
}
$fixed .= ' '
- .''.$$toolprivs{$tool}{$priv}.' ';
+ .''.&mt($$toolprivs{$tool}{$priv}).' ';
if ($action eq 'modify') {
if (grep(/^$tool$/,@{$available})) {
$fixed .= ''.&mt('(on)').' ';
@@ -2331,7 +2332,7 @@ sub default_privileges {
$dynamic .= '
'."\n";
}
- $dynamic .= ' '.$$toolprivs{$tool}{$priv}.' '."\n";
+ $dynamic .= ' '.&mt($$toolprivs{$tool}{$priv}).' '."\n";
}
}
if ($privcount == 0) {
@@ -2516,7 +2517,7 @@ sub current_membership {
$r->print('
- '.$lt{'curf'}.'
+ '.$lt{'curf'}.'
@@ -2674,7 +2675,7 @@ sub check_uncheck_buttons {
$r->print('
- '.$title.'
+ '.$title.'
@@ -2958,9 +2959,8 @@ sub member_privileges_form {
foreach my $tool (@{$tools}) {
if (@{$showboxes{$tool}} > 0) {
$r->print(' ');
- $r->print(''.
- ''.
- &mt($tool).' ');
+ $r->print(''.&mt($tool).' ');
+ $r->print(' ');
+ $r->print('
');
}
}
$r->print(' ');
@@ -3128,7 +3128,7 @@ sub write_group_data {
if ($quota !~ /^\d*\.?\d*$/) {
$quota = 0;
$r->print(' '
- .&mt('The value you entered for the quota for the file repository in this '.$gpterm
+ .&mt('The value you entered for the quota for the group portfolio in this '.$gpterm
.' contained invalid characters, so it has been set to 0 Mb. You can change this by'
.' modifying the '.$gpterm.' settings.')
.'
');
@@ -3136,7 +3136,7 @@ sub write_group_data {
if ($quota > $maxposs) {
$quota = $maxposs;
$r->print(''
- .&mt('The value you entered for the quota for the file repository in this '.$gpterm
+ .&mt('The value you entered for the quota for the group portfolio in this '.$gpterm
.' exceeded the maximum possible value, so it has been set to [_1] Mb '
.'(the maximum possible value).',sprintf("%.2f",$maxposs))
.'
');
@@ -3238,7 +3238,7 @@ sub write_group_data {
my $outcome = &map_updater($cdom,$cnum,'group_boards_'.
$groupname.'.sequence','bbseq',
$disctitle,$grpmap);
- my ($furl,$ferr) =
+ my ($furl,$ferr) =
&Apache::lonuserstate::readmap($cdom.'/'.$cnum);
# modify parameter
if ($outcome eq 'ok') {
@@ -3528,7 +3528,6 @@ sub mapping_options {
'adds' => "If automatic $gpterm enrollment is enabled, when a user is newly assigned a ".lc($crstype)."-wide or section-specific role, he/she will automatically be added as a member of the $gpterm, with start and end access dates defined by the default dates set for the $gpterm, unless he/she is already a $gpterm member, with access dates that permit either current or future $gpterm access.",
'drops' => "If automatic $gpterm disenrollment is enabled, when a user's role is expired, access to the $gpterm will be terminated unless the user continues to have other ".lc($crstype)."-wide or section-specific active or future roles which receive automatic membership in the $gpterm.",
'pirs' => "Pick roles and sections for automatic $gpterm enrollment",
- 'curr' => 'Currently set to',
'on' => 'on',
'off' => 'off',
'auad' => "Automatically enable $gpterm membership when roles are added?",
@@ -3556,14 +3555,14 @@ sub automapping {
'.$$lt{'auad'}.':
'.&mt('on').' '.&mt('off').' ');
if ($action eq 'modify') {
- $r->print(' ('.$$lt{'curr'}.' '.$$lt{$add}.' )');
+ $r->print(' ('.&mt('Currently set to [_1].',''.$$lt{$add}.' ').')');
}
$r->print('
'.$$lt{'auex'}.':
'.&mt('on').' '.&mt('off').' ');
if ($action eq 'modify') {
- $r->print(' ('.$$lt{'curr'}.' '.$$lt{$drop}.' )');
+ $r->print(' ('.&mt('Currently set to [_1].',''.$$lt{$drop}.' ').')');
}
$r->print(' '.$$lt{'mapr'});
}
@@ -3760,17 +3759,19 @@ sub date_setting_table {
'startdate',$starttime);
my $endform = &Apache::lonhtmlcommon::date_setter($formname,
'enddate',$endtime);
- my $perpetual =
- ' '.
- &mt('None').' ';
- my $table = "\n";
+ my $perpetual = ' '
+ .' '
+ .&mt('No end date')
+ .' ';
+ 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;
}