Commit de3bf044 authored by Jack Stupple's avatar Jack Stupple

accidentally found remainder not modulo

parent f42dddd9
......@@ -102,7 +102,7 @@ class Player extends Model
$actual_position = floor($this->progress / (int) getenv('QUESTIONS_PER_SEASON'));
// if the question is a multiple of the questions per season and we are on the last question then the icons position would be
// incremented- but we don't want that as that means 4 icons instead of 3 and so we just remove 1 position.
if ($this->progress / (int) getenv('QUESTIONS_PER_SEASON') === 0 && $this->progress === $this->questions) {
if ($this->progress % (int) getenv('QUESTIONS_PER_SEASON') === 0 && $this->progress === $this->questions) {
return $actual_position - 1; // this is so that when on question 9 you are on the expected season roundup page
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment