4th April 2025, 7:03 AM
(This post was last modified: 4th April 2025, 7:37 AM by Master Raiden. Edited 3 times in total.)
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.
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]](https://i.imgur.com/q2GRKUL.png)