Skip to content

Commit d5711ef

Browse files
authored
Merge pull request #2792 from somiaj/allow-at-userid-hotfix
Allow @ in user id when adding new course. (Hotfix)
2 parents 75974fd + 45a5c40 commit d5711ef

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/WeBWorK/ContentGenerator/CourseAdmin.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ sub add_course_validate ($c) {
267267
for (1 .. $number_of_additional_users) {
268268
my $userID = trim_spaces($c->param("add_initial_userID_$_")) || '';
269269

270-
unless ($userID =~ /^[\w.,-]*$/) {
270+
unless ($userID =~ /^[\w.,-@]*$/) {
271271
push @errors,
272272
$c->maketext(
273273
'User ID number [_1] may only contain letters, numbers, hyphens, periods, commas, '
274-
. 'and underscores.',
274+
. 'at symbols, and underscores.',
275275
$_
276276
);
277277
}

templates/ContentGenerator/CourseAdmin/add_course_form.html.ep

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@
9191
data => {
9292
'bs-placement' => 'top',
9393
'bs-title' => maketext(
94-
'User ID may contain only numbers, letters, hyphens, periods, and underscores.'
94+
'User ID may contain only numbers, letters, hyphens, periods, commas, at symbols, '
95+
. 'and underscores.'
9596
)
9697
} =%>
9798
<%= label_for "add_initial_userID_$_" => maketext('User ID') =%>

0 commit comments

Comments
 (0)