'.$lt{'doyo'}.' ');
if ($action eq 'modify') {
- $r->print(' ('.&mt('Currently set to "[_1]"',
- &mt($$stored{'granularity'})).')');
+ $r->print(' ('.&mt('Currently set to [_1].'
+ ,'"'.&mt($$stored{'granularity'}).'"').')');
}
$r->print('
@@ -2065,13 +2071,13 @@ sub pick_new_members {
if (@{$available} > 0 && $granularity eq 'Yes') {
$r->print('
');
}
$r->print('
@@ -2094,13 +2100,13 @@ sub pick_new_members {
if ($granularity eq 'Yes') {
$r->print(&Apache::loncommon::start_data_table_row('LC_data_table_dense LC_data_table_highlight').'
');
+ $r->print($outcome);
}
- } else {
- $r->print($outcome);
}
- undef($navmap);
+ } else {
+ $error = &mt("An error occurred while retrieving the contents of the group's folder.").' '.
+ &mt('You need to re-initialize the course.');
+ }
+ if ($error ne '') {
+ $r->print('
'.$error.'
');
}
}
$r->print('
'
@@ -3509,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?",
@@ -3534,19 +3552,19 @@ sub automapping {
}
$r->print(&Apache::lonhtmlcommon::topic_bar($image,$$lt{'endi'}).'
'.$$lt{'gmma'}.': '.$$lt{'adds'}.' '.$$lt{'drops'}.'
- '.$$lt{'auad'}.':
+ '.$$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'}.':
+
+ '.$$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'});
+ $r->print('
'.$$lt{'mapr'});
}
sub mapping_settings {
@@ -3706,16 +3724,16 @@ sub member_privs_entries {
if ($privcount == 3) {
$dynamic .= '
';
}
- $dynamic .='
';
+ '';
}
}
- $r->print('
'.$fixed.'
'.$dynamic.'
');
+ $r->print('
'.$fixed.'
'.$dynamic.'
');
} else {
$r->print('
'.$tool.'
');
}
@@ -3742,8 +3760,8 @@ sub date_setting_table {
my $endform = &Apache::lonhtmlcommon::date_setter($formname,
'enddate',$endtime);
my $perpetual =
- ''.
- &mt('None').'';
+ ''.
+ &mt('None').'';
my $table = "
\n".
'
'.&mt('Start:').'
'.
'
'.$startform.'
'.
@@ -3787,7 +3805,7 @@ sub add_group_folder {
if ($delresult ne 'ok') {
$warning = $delresult;
}
- return $outcome;
+ return $outcome.$warning;
}
}
my $delresult = &release_folder_lock($cdom,$cnum,'group_allfolders');
@@ -3797,7 +3815,7 @@ sub add_group_folder {
} else {
$outcome = ''
.&mt('Could not obtain exclusive lock to check status of the folder for all groups. No group folder added.')
- .'';
+ .'';
return $outcome;
}
my $grpfolder = &mt($ucgpterm.' Folder - [_1]',$description);
@@ -3828,6 +3846,10 @@ sub add_group_folder {
}
my ($furl,$ferr)= &Apache::lonuserstate::readmap($cdom.'/'.$cnum);
my $navmap = Apache::lonnavmaps::navmap->new();
+ if (!defined($navmap)) {
+ return $warning.''.&mt('Error retrieving course contents').
+ ' '.&mt('You need to re-initialize the course.').'';
+ }
# modify parameters
my $parm_result;
if ($action eq 'create') {
@@ -3933,6 +3955,10 @@ sub new_map {
sub parm_setter {
my ($navmap,$cdom,$url,$groupname) = @_;
my $allresults;
+ if (!defined($navmap)) {
+ $allresults = &mt('Parameters not set for [_1] because the contents of the course could not be retrieved.',$url).' '.
+ &mt('You need to reinitialize the course.').' ';
+ }
my %hide_settings = (
'course' => {
'num' => 13,