Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Learning and Work
managing-money-api
Commits
de3bf044
Commit
de3bf044
authored
Jun 19, 2018
by
Jack Stupple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accidentally found remainder not modulo
parent
f42dddd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
app/Player.php
app/Player.php
+1
-1
No files found.
app/Player.php
View file @
de3bf044
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment