Skip to content

Commit

Permalink
Merge pull request #2607 from drgrice1/user-list-warnings
Browse files Browse the repository at this point in the history
Fix warnings that occur when the Accounts Manager page is loaded.
  • Loading branch information
pstaabp authored Oct 29, 2024
2 parents 6a0f21e + fba8dfd commit dd844c7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/WeBWorK/ContentGenerator/Instructor/UserList.pm
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,16 @@ sub pre_header_initialize ($c) {

# Always have a definite sort order in case the first three sorts don't determine things.
$c->{sortedUserIDs} = [
map { $_->user_id }
sort { &$primarySortSub || &$secondarySortSub || &$ternarySortSub || byLastName || byFirstName || byUserID }
grep { $c->{visibleUserIDs}{ $_->user_id } } (values %allUsers)
map { $_->user_id }
sort {
$primarySortSub->()
|| $secondarySortSub->()
|| $ternarySortSub->()
|| byLastName()
|| byFirstName()
|| byUserID()
}
grep { $c->{visibleUserIDs}{ $_->user_id } } (values %allUsers)
];

return;
Expand Down

0 comments on commit dd844c7

Please sign in to comment.