'.
@@ -785,7 +785,7 @@ sub group_administration {
}
var maxposs = '.sprintf("%.2f",$maxposs).';
if (newquota > maxposs) {
- alert("The file repository quota you entered for this group ("+newquota+" Mb) exceeds the maximum possible ("+maxposs+" Mb). Please enter a smaller number.");
+ alert("The group portfolio quota you entered for this group ("+newquota+" Mb) exceeds the maximum possible ("+maxposs+" Mb). Please enter a smaller number.");
return;
}
var re_quota = '.$float_check.';
@@ -804,7 +804,7 @@ sub group_administration {
}
}
if (warn_zero == 1) {
- alert("You have indicated that the file repository should be enabled, but you have set the respository quota to 0 Mb.\nThis will prevent any upload of files.\nPlease set a value or disable the repository feature.");
+ alert("You have indicated that the group portfolio should be enabled, but you have set the respository quota to 0 Mb.\nThis will prevent any upload of files.\nPlease set a value or disable the repository feature.");
return;
}
}
@@ -915,11 +915,11 @@ function changeSort(caller) {
result => 'Re-enabled'
);
my %navbuttons = &Apache::lonlocal::texthash(
- gtns => 'Go to next step',
- gtps => 'Go to previous step',
+ gtns => 'Next',#'Go to next step',
+ gtps => 'Back',#'Go to previous step',
crgr => 'Create '.$gpterm,
- mose => 'Modify settings',
- gtpp => 'Go to previous page',
+ mose => 'Save',#'Modify settings',
+ gtpp => 'Back',#'Go to previous page',
adme => 'Add members',
);
if ((($action eq 'create') || ($action eq 'modify') || ($action eq 'delete') || ($action eq 'reenable')) &&
@@ -1259,12 +1259,18 @@ sub reenable_folder {
sub modify_folders {
my ($cdom,$cnum,$groupname) = @_;
- my $outcome;
+ my ($outcome,$groupmap,$groupmapres,$map,$id,$src);
my $navmap = Apache::lonnavmaps::navmap->new();
- my $groupmap = '/uploaded/'.$cdom.'/'.$cnum.'/'.'group_folder_'.
+ if (!defined($navmap)) {
+ $outcome = '
'.
+ &mt('Error reading course contents.').' '.
+ &mt('You need to re-initialize the course.').
+ '
';
+ return $outcome;
+ }
+ $groupmap = '/uploaded/'.$cdom.'/'.$cnum.'/'.'group_folder_'.
$groupname.'.sequence';
- my $groupmapres = $navmap->getResourceByUrl($groupmap);
- my ($map,$id,$src);
+ $groupmapres = $navmap->getResourceByUrl($groupmap);
if ($groupmapres) {
($map,$id,$src)=&Apache::lonnet::decode_symb($groupmapres->symb());
}
@@ -1582,7 +1588,7 @@ sub general_settings_form {
@{$tools} = sort(keys(%{$functions}));
&privilege_specificity($r,$action,3,$tools,$stored,$toolprivs,
$fixedprivs,\@available,$formname,
- $gpterm,$ucgpterm);
+ $gpterm,$ucgpterm,$functions);
&mapping_options($r,$action,$formname,$page,$sectioncount,
$states,$stored,$navbuttons,4,5,
$gpterm,$ucgpterm,$crstype,$cdom,$cnum);
@@ -1643,7 +1649,7 @@ END
for (my $i=0; $i<$halfnum; $i++) {
$r->print('
+ &mt($$functions{$allfunctions[$i]}).'
');
}
$r->print('
print('
+ &mt($$functions{$allfunctions[$j]}).'
');
}
if ($remnum) {
@@ -1668,8 +1674,8 @@ END
'.&mt('Granularity:').'
'.$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('
@@ -1677,9 +1683,9 @@ END
'.&mt('Disk quota: ').'
');
if ($action eq 'create') {
- $r->print(&mt('If you enable the file repository for the '.$gpterm.', allocate a disk quota.'));
+ $r->print(&mt('If you enable the group portfolio for the '.$gpterm.', allocate a disk quota.'));
} else {
- $r->print(&mt('Quota allocated to file repository:'));
+ $r->print(&mt('Quota allocated to group portfolio:'));
}
$r->print(' '.&mt('[_1] Mb',''));
if ($action eq 'create') {
@@ -1798,7 +1804,7 @@ sub sections_selection {
}
}
my $output = '
-
',@{$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 = '';
@@ -2310,7 +2320,7 @@ sub default_privileges {
$fixed .= '
'."\n";
}
}
if ($privcount == 0) {
@@ -3122,7 +3132,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.')
.'
');
@@ -3130,7 +3140,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))
.'
');
@@ -3222,36 +3232,49 @@ sub write_group_data {
my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/';
my $boardsmap = $crspath.'group_boards_'.$groupname.'.sequence';
my $navmap = Apache::lonnavmaps::navmap->new();
- my $bbmapres = $navmap->getResourceByUrl($boardsmap);
- undef($navmap);
- if (!$bbmapres) {
- my $grpmap = $crspath.'group_folder_'.$groupname.'.sequence';
- my $disctitle = &mt('Discussion Boards');
- my $outcome = &map_updater($cdom,$cnum,'group_boards_'.
- $groupname.'.sequence','bbseq',
- $disctitle,$grpmap);
- my ($furl,$ferr) =
- &Apache::lonuserstate::readmap($cdom.'/'.$cnum);
- $navmap = Apache::lonnavmaps::navmap->new();
- # modify parameter
- if ($outcome eq 'ok') {
- my $parm_result = &parm_setter($navmap,$cdom,$boardsmap,
- $groupname);
- if ($parm_result) {
- $r->print('
');
+ $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 +3532,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?",
@@ -3537,14 +3559,14 @@ sub automapping {
'.$$lt{'auad'}.':
');
if ($action eq 'modify') {
- $r->print(' ('.$$lt{'curr'}.' '.$$lt{$add}.')');
+ $r->print(' ('.&mt('Currently set to [_1].',''.$$lt{$add}.'').')');
}
$r->print('
'.$$lt{'auex'}.':
');
if ($action eq 'modify') {
- $r->print(' ('.$$lt{'curr'}.' '.$$lt{$drop}.')');
+ $r->print(' ('.&mt('Currently set to [_1].',''.$$lt{$drop}.'').')');
}
$r->print('
'.$$lt{'mapr'});
}
@@ -3828,6 +3850,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 +3959,13 @@ 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.').
+ '