--- loncom/interface/loncoursegroups.pm 2014/02/27 11:16:06 1.124
+++ loncom/interface/loncoursegroups.pm 2014/12/11 01:19:07 1.127
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursegroups.pm,v 1.124 2014/02/27 11:16:06 bisitz Exp $
+# $Id: loncoursegroups.pm,v 1.127 2014/12/11 01:19:07 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -831,7 +831,7 @@ sub group_administration {
}
}
if (warn_zero == 1) {
- 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.");
+ alert("You have indicated that the group portfolio should be enabled, but you have set the repository quota to 0 MB.\nThis will prevent any upload of files.\nPlease set a value or disable the repository feature.");
return;
}
}
@@ -1587,7 +1587,7 @@ sub group_members {
future => 0,
);
my $totalmembers = 0;
- foreach my $member (keys %memberhash) {
+ foreach my $member (keys(%memberhash)) {
$totalmembers ++;
my ($end,$start) = split(/:/,$memberhash{$member});
unless ($start == -1) {
@@ -1702,7 +1702,7 @@ sub groupsettings_options {
if ($remnum) {
$halfnum ++;
}
- my @allfunctions = sort(keys (%{$functions}));
+ my @allfunctions = sort(keys(%{$functions}));
$r->print(&Apache::lonhtmlcommon::row_title($lt{'func'})
.'
'
@@ -3503,7 +3503,7 @@ sub process_membership {
if (grep/^$user$/,@reenable) {
$start = $startdate;
$end = $enddate;
- $type = 'reenabled';
+ $type = 're-enabled';
}
}
if ($type eq '') {
@@ -4188,43 +4188,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;