Skip to content

Commit dd844c7

Browse files
authored
Merge pull request #2607 from drgrice1/user-list-warnings
Fix warnings that occur when the Accounts Manager page is loaded.
2 parents 6a0f21e + fba8dfd commit dd844c7

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/WeBWorK/ContentGenerator/Instructor/UserList.pm

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,16 @@ sub pre_header_initialize ($c) {
236236

237237
# Always have a definite sort order in case the first three sorts don't determine things.
238238
$c->{sortedUserIDs} = [
239-
map { $_->user_id }
240-
sort { &$primarySortSub || &$secondarySortSub || &$ternarySortSub || byLastName || byFirstName || byUserID }
241-
grep { $c->{visibleUserIDs}{ $_->user_id } } (values %allUsers)
239+
map { $_->user_id }
240+
sort {
241+
$primarySortSub->()
242+
|| $secondarySortSub->()
243+
|| $ternarySortSub->()
244+
|| byLastName()
245+
|| byFirstName()
246+
|| byUserID()
247+
}
248+
grep { $c->{visibleUserIDs}{ $_->user_id } } (values %allUsers)
242249
];
243250

244251
return;

0 commit comments

Comments
 (0)