Skip to content

Commit

Permalink
Merge pull request #2268 from drgrice1/userlist-filter-on-translated
Browse files Browse the repository at this point in the history
Fix filtering the user list by permission level or status for other languages.
  • Loading branch information
Alex-Jordan authored Dec 16, 2023
2 parents 6762d2c + 82f1840 commit 2b193de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/WeBWorK/ContentGenerator/Instructor/UserList.pm
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,12 @@ sub filter_handler ($c) {
for my $userID (@{ $c->{allUserIDs} }) {
if ($field eq 'permission') {
push @matchingUserIDs, $userID
if ($permissionLabels{ $allUsers{$userID}{permission} } =~ /^$regex/i);
if $permissionLabels{ $allUsers{$userID}{permission} } =~ /^$regex/i
|| $c->maketext($permissionLabels{ $allUsers{$userID}{permission} }) =~ /^$regex/i;
} elsif ($field eq 'status') {
push @matchingUserIDs, $userID
if ($ce->status_abbrev_to_name($allUsers{$userID}{status}) =~ /^$regex/i);
if $ce->status_abbrev_to_name($allUsers{$userID}{status}) =~ /^$regex/i
|| $c->maketext($ce->status_abbrev_to_name($allUsers{$userID}{status})) =~ /^$regex/i;
} else {
push @matchingUserIDs, $userID if $allUsers{$userID}{$field} =~ /^$regex/i;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/WeBWorK/Localize.pm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ our %Lexicon = (
x('ta'), x('professor'), x('admin'), x('nobody')
],

'_STATUS' => [ x('Enrolled'), x('Audit'), x('Drop'), x('Proctor') ],
'_STATUS' => [ x('Enrolled'), x('Audit'), x('Drop'), x('Proctor'), x('Observer') ],
);

1;

0 comments on commit 2b193de

Please sign in to comment.