[PR2 Bug] Cannot rate level 7 days after last rating
#1
Problem: Players have to wait more than 7 days after rating a level before they can rate it again
Type of Problem: Server
Expected Behavior: Players have to wait exactly 7 days (604,800 seconds) before rating a level again
Actual Behavior: Players have to wait more than 7 days before rating a level again
Steps to Reproduce the Problem:
1. Rate Memories by Stunt (6508994) 5 stars
2. Wait exactly 7 days
3. Try to rate it 5 stars again
You will get the message: Error: You have recently voted on this level. You can vote on it again in a week.

Additional Information:
This problem lies in the platform-racing-2-server/common/queries/ratings.php file.
On line 57, old ratings are deleted if they are more than 7 days old.
This means that ratings that are exactly 7 days old will not get deleted, and players will have to wait an extra day for the query to be run again.

Given that players can rate levels during any time of the day, they will most likely have to wait more than 7 days before they can rate again.
For example, if I rate a level 6 hours into the day, the rating deletion query will run X.75 days after the rating was made, meaning that I will have to wait 7.75 days before I can rate again.
No matter when I rate a level, I will have to wait 7.00-7.99 days (average of 7.5) before I can rate it again.

So I think the rating deletion query should delete ratings that are 6.5+ days old, so that players will only have to wait 6.50-7.49 days (average of 7) instead.

Either that, or the daily queries should be run more often.
[Image: q2GRKUL.png]
Reply
#2
The real bug is people not rating Memories by Stunt 5 stars Frown
𝒮𝓉𝒶𝓎 𝒸𝑜𝑜𝓁,

𝒮𝓉𝓊𝓃𝓉
Reply
#3
It should probably just delete after 6 days in that case (as in "more than 6 days", so would be 7 cycles. E.g. you rate at 6:00, then 1st check is 0.75, then 1.75, 2.75, 3.75, 4.75, 5.75, 6.75 and it deletes rating then)
Since then if you rate it on a given day of the week (in UTC) it should only let you rate it again when it's that day of the week again
á
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)