Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a list of the top ten users sorted by points. The problem is that when two users have the same number of points, everything gets messed up. So if user A and user B had the same amount of user points the ranking order gets messed up... So if it has user A ranked 5th and user B was ranked 4th, it will show user B above user A... so the numbers would go like, 1, 2, 3, 5, 4, 6, 7, 8, 9, 10. Where 4 and 5 are switched around...
Comments
Comment #1
mpaler CreditAttribution: mpaler commentedI agree that the way rank is doled out is a little counterintuitive. I have alot of users who have the same number of user points, yet their ranks are all different. Personally, I think all people with the same # of points should have the same rank.
Here's my way of handling that...
Around line 265 in userpoints_top_contributors.module
Comment #2
walker2238 CreditAttribution: walker2238 commentedHey good idea. I actually made a block with something like that but only returning the first 10 results. It never crossed my mind to just apply it to everything. I'll give it a try.
Comment #3
kmillecam CreditAttribution: kmillecam commentedCommitted to dev.