EmotionCognitionLab / pvs

1 stars 0 forks source link

Use stage transition dates when calculating lumosity earnings #311

Closed noah10 closed 1 year ago

noah10 commented 1 year ago

You transition from stage 2 -> stage 3 at 1AM (when the lumosity reports run) on the day that you have played 31 total lumosity games and each game at least twice. Then, at 2AM on that same day, we calculate your lumosity earnings. As part of that we take into account which stage you're in. If you're in stage 3 you have to do 3 breathing segments after playing lumosity to get paid. This means that at 2AM you are already in stage 3, but we're looking at practice done while you were in stage 2. We need to take the date of the stage 2 -> stage 3 transition into account when determining which stage your earnings should be evaluated against.

noah10 commented 1 year ago

This could also happen when the user finishes their home training. If they play lumosity and do their breathing on 6/5/23, then show up for their fifth visit and turn in their laptop on that same day, at 2AM on 6/6/23 we will see that they are no longer doing their home training and not pay them for the lumosity+breathing they did on 6/5.

noah10 commented 1 year ago

After discussion with Mara, we decided that the case where a user incorrectly retains their laptop after visit 5 and keeps doing lumosity+breathing training was rare enough that we would ignore it. The code will simply calculate lumosity+breathing earnings regardless of whether/when someone came in for visit 5 and is therefore supposedly done with lumosity+breathing training.