'
@@ -2549,6 +2555,7 @@ sub current_membership {
'actn' => 'Action?',
'name' => 'Name',
'usnm' => 'Username',
+ 'stid' => 'ID',
'doma' => 'Domain',
'stda' => 'Start Date',
'enda' => 'End Date',
@@ -2610,7 +2617,7 @@ END
$lt{'name'} |
$lt{'usnm'} |
$lt{'doma'} |
-
ID |
+
$lt{'ID'} |
$lt{'stda'} |
$lt{'enda'} |
END
@@ -2734,7 +2741,10 @@ END
}
$r->print(&Apache::loncommon::end_data_table());
} else {
- $r->print(&mt('There are no active, future or previous group members to modify.'));
+ $r->print(
+ '
'
+ .&mt('There are no active, future or previous group members to modify.')
+ .'
');
}
return $numcurrent;
}
@@ -2802,7 +2812,7 @@ sub change_privs_form {
}
}
if (!$exp_or_del) {
- $r->print($lt{'nome'}.'
');
+ $r->print('
'.$lt{'nome'}.'
');
}
$r->print(&Apache::lonhtmlcommon::topic_bar(4,&mt('Setting optional privileges for specific group members')));
@@ -3365,10 +3375,10 @@ sub write_group_data {
&Apache::lonnet::logthis("Failed to store $gpterm $groupname ".
'in '.lc($crstype).': '.$cnum.
' in domain: '.$cdom);
- $r->print('
'
- .&mt('An error occurred when [_1] the '.$gpterm.'. '
- .'Please try again.',$actiontype{$action})
- .'
');
+ $r->print('
'
+ .&mt('An error occurred when '.$actiontype{$action}.' the '.$gpterm.'. '
+ .'Please try again.')
+ .'
';
+ $message .= &mt($tmsg.':').'
';
foreach my $user (@{$added{$type}}) {
my $privlist = '';
if (!($type eq 'deleted' || $type eq 'expired')) {
@@ -3751,21 +3762,21 @@ sub modify_menu {
items => [
{ linktext => "Modify default $gpterm settings",
- url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=change_settings&branch=settings',
+ url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=change_settings&branch=settings',
icon => 'grp_settings.png',
alttext => "Modify default $gpterm settings",
permission => '1',
help => 'Course_Modify_Group',
},
{ linktext => 'Modify access, tools and privileges for members',
- url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=change_members&branch=members',
+ url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=change_members&branch=members',
icon => 'grp_tools.png',
alttext => 'Modify access, tools and privileges for members',
permission => '1',
help => 'Course_Modify_Group_Membership',
},
{ linktext => "Add member(s) to the $gpterm",
- url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=add_members&branch=adds',
+ url => '/adm/coursegroups?action=modify&refpage='.$env{'form.refpage'}.'&groupname='.$groupname.'&state=add_members&branch=adds',
icon => 'grp_add.png',
alttext => "Add member(s) to the $gpterm",
permission => '1',
@@ -4183,43 +4194,40 @@ sub validate_groupname {
}
my %lt = &Apache::lonlocal::texthash (
igna => "Invalid $gpterm name",
- tgne => "The $gpterm name entered ",
grna => "$ucgpterm names and section names used in a ".
"$crstype must be unique.",
- isno => "is not a valid name.",
gnmo => "$ucgpterm names may only contain letters, ".
"numbers or underscores.",
- cnnb => "can not be used as it is the name of ",
- inth => " in this $crstype",
- thgr => "- does not correspond to the name of an ".
- "existing $gpterm",
);
- my $exitmsg = '
'.$lt{'igna'}.''.
- $lt{'tgne'}.' "'.$groupname.'" ';
- my $dupmsg = $lt{'grna'};
- my $earlyout;
+ my $exitmsg = '
'.$lt{'igna'}.'';
+ my $nameshown = &Apache::loncommon::cleanup_html($groupname);
if (($groupname eq '') || ($groupname =~ /\W/)) {
- $earlyout = $exitmsg.$lt{'isno'}.'
'.$lt{'gnmo'};
- return $earlyout;
+ return $exitmsg.
+ &mt("The $gpterm name entered '[_1]' is not a valid name.",$nameshown).
+ '
'.$lt{'gnmo'};
+ } elsif ($groupname eq 'syllabus') {
+ return $exitmsg.
+ &mt("The $gpterm name entered '[_1]' is reserved for use by LON-CAPA.",$nameshown);
}
if (exists($sectioncount{$groupname})) {
- return $exitmsg.$lt{'cnnb'}.&mt('a section').$lt{'inth'}.
- '
'.$lt{'grna'};
+ return $exitmsg.
+ &mt("The $gpterm name entered '[_1]' can not be used as it is the name of a section in this $crstype.",$nameshown).
+ '
'.$lt{'grna'};
}
if ($action eq 'create') {
if (exists($curr_groups{$groupname})) {
- return $exitmsg.$lt{'cnnb'}.&mt("an existing $gpterm").
- $lt{'inth'}.'.
'.$lt{'grna'};
+ return $exitmsg.
+ &mt("The $gpterm name entered '[_1]' can not be used as it is the name of an existing $gpterm in this $crstype.",$nameshown).
+ '
'.$lt{'grna'};
} elsif (exists($deleted_groups{$groupname})) {
- return $exitmsg.$lt{'cnnb'}.&mt("a $gpterm which previously existed").
- $lt{'inth'}.'.
'.$lt{'grna'};
+ return $exitmsg.
+ &mt("The $gpterm name entered '[_1]' can not be used as it is the name of a $gpterm which previously existed in this $crstype.",$nameshown).
+ '
'.$lt{'grna'};
}
} elsif ($action eq 'modify') {
unless(exists($curr_groups{$groupname})) {
- $earlyout = &mt("$ucgpterm name:").' '.$groupname.$lt{'thgr'}.
- $lt{'inth'};
- return $earlyout;
+ return &mt("$ucgpterm name: [_1] does not correspond to the name of an existing $gpterm in this $crstype.",$nameshown);
}
}
return;