'.
@@ -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.').
+ '
');
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 = '
-
@@ -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').'
');
@@ -2669,13 +2679,13 @@ sub check_uncheck_buttons {
');
@@ -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('
- '.$$lt{'auad'}.':
+ '.$$lt{'auad'}.':
'.&mt('on').' '.&mt('off').'');
if ($action eq 'modify') {
$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(' ('.&mt('Currently set to [_1].',''.$$lt{$drop}.'').')');
}
- $r->print('
'.$$lt{'mapr'});
+ $r->print('
'.$$lt{'mapr'});
}
sub mapping_settings {
@@ -3705,16 +3728,16 @@ sub member_privs_entries {
if ($privcount == 3) {
$dynamic .= '
';
}
- $dynamic .='
';
+ '';
}
}
- $r->print('
'.$fixed.'
'.$dynamic.'
');
+ $r->print('
'.$fixed.'
'.$dynamic.'
');
} else {
$r->print('
'.$tool.'
');
}
@@ -3741,8 +3764,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.'
'.
@@ -3786,7 +3809,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');
@@ -3796,7 +3819,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);
@@ -3827,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') {
@@ -3932,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.').
+ '