openbenches.org
openbenches.org copied to clipboard
Leaderboard moves edited benches to editor
I corrected one of ukmoose's benches that said Brampton Stoker and should be Bram Stoker and it's now moved to my board. Could the leaderboard be set to count created rather than a last edited field, if that's what is happening?
Thanks
I like that editing increases your score, as I often forget to login, and then moving the anonymous bench a smidgen gets me the credit. Edits should not reduce anyone's score of course.
I'm thinking about how to implement this - from both a user and database perspective.
Currently, every bench
has a single user
.
When a bench is edited, the user
is changed, and that change is recorded in the benches_history
table. That means the original user's count goes down by 1, and the editor's goes up by 1.
When a duplicate bench is merged, the duplicate has published
set to 0
and gets an entry in the merged_benches
table. Similarly, the submitter of the duplicate bench loses a count, but the original user's count doesn't increase.
When a bench is deleted (usually because there's no inscription, or other quality issues), the bench has published
set to 0
, and the submitter loses a count.
What do we want in the future?
-
A deleted bench should reduce the user's score. That's pretty uncontroversial. Already implemented.
-
A merged bench - only the original user gets a +1 score. That makes like simple for the database design. But should the duplicate uploader still get a +1?
-
An edited bench The big one! At the moment, there's a 1:1 link between a bench and a user. Whoever last edited the bench gets the point. Without a large database redesign, there's no way to add multiple people to a bench.
Is it worth redesigning the DB to allow 1:N mapping of benches and users? Each image has a unique user - that may be a better metric to track.
Finally - remember, this is all just for fun. The points are meaningless and cannot be redeemed for fabulous prizes!
Approach 1) For each user scan the media structure and extract benchIDs, and count how many unique ones. T|his would omit location edits, and multiple edits to the same bench, but never mind. Would restore all the benches lost by users. Could be slow.if run regularly.
- Leave the bench structure alone, and add a new field to the user structure, "changes", which is populated one time with (1), and then incremented whenever a user completes a new action, whether create or edit.
Approach (2) seems better
NB, the actual list of benches edited per user would need approach 1, but it would occur once per page load, not many times as for the leader board itself.
Thanks for looking at this again 😸 I was assuming the database would (or could) have a created
column and maybe an edit
column and that the created would lead to the points.
After much thought...
The new version of OpenBenches ignores who edits a bench.
If @jrbray1 adds a new bench - then it is theirs no matter how many times @Lextuga007 edits it.
Added images will always belong to whoever uploaded them.
The admin (me!) gets a notification with a user ID of whoever edits a bench, it's also recorded in the database. So any malicious edits can be rolled back and users blocked.
I hope that's satisfactory. And thank you for your patience.
The easiest solution that stops the system being gamed, not that anyone really cares. https://openbenches.org/leaderboard says "Most added and edited benches" which will need changing.
On Sun, 14 May 2023 at 21:08, Terence Eden @.***> wrote:
After much thought...
The new version of OpenBenches ignores who edits a bench.
If @jrbray1 https://github.com/jrbray1 adds a new bench - then it is theirs no matter how many times @Lextuga007 https://github.com/Lextuga007 edits it.
Added images will always belong to whoever uploaded them.
The admin (me!) gets a notification with a user ID of whoever edits a bench, it's also recorded in the database. So any malicious edits can be rolled back and users blocked.
I hope that's satisfactory. And thank you for your patience.
— Reply to this email directly, view it on GitHub https://github.com/openbenches/openbenches.org/issues/228#issuecomment-1546990623, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGE3HVIQ5PF6RV7GKGBWN7TXGE3VVANCNFSM4R3AM7VA . You are receiving this because you were mentioned.Message ID: @.***>