zeeguu / api

API for tracking a learner's progress when reading materials in a foreign language and recommending further personalized exercises and readings.
https://zeeguu.org
MIT License
8 stars 24 forks source link

Wrong exercise session duration #308

Open mircealungu opened 2 days ago

mircealungu commented 2 days ago

How is it possible that the exercise session below lasted 16minutes?

User:  (4239) Duration: 16 minutes and 6 seconds

2024-11-28 19:55:12      4      S des             Match_three_L1W_to_three_L2W   
2024-11-28 19:55:12      4      S les             Match_three_L1W_to_three_L2W   
2024-11-28 19:55:12      4      S pour            Match_three_L1W_to_three_L2W   
2024-11-28 19:55:13      2      S comme           Select_L2W_fitting_L2T   
2024-11-28 19:55:18      1      S Très            Recognize_L1W_in_L2T   
2024-11-28 19:55:28      4      S été             Spell_What_You_Hear   
2024-11-28 19:55:33      1      S accord          Recognize_L1W_in_L2T   
2024-11-28 19:55:39      2      S depuis          Match_three_L1W_to_three_L2W   
2024-11-28 19:55:39      2     WS place           Match_three_L1W_to_three_L2W   
2024-11-28 19:55:39      2     WS Après           Match_three_L1W_to_three_L2W   
2024-11-28 19:57:26      4      S Premier         Select_L2W_fitting_L2T   
2024-11-28 19:57:32      4      S main            Recognize_L1W_in_L2T   
2024-11-28 19:58:18     17  HWWWS prochaine       Spell_What_You_Hear   
2024-11-28 20:04:03    334 WWWWWWWS les             Select_L2W_fitting_L2T   

It is suspicious how the user spent 7 minutes on trying to solve the last exercise. Is it possible that they were taking one minute break between attempts?

mircealungu commented 2 days ago

Ok, looking into this user's activity, it does look a bit strange:

| 1841818 |    4239 | 2024-11-28 19:55:22 | TRANSLATE WORDS IN EXERCISE | situations |    2419209 | Spell_What_You_Hear    |              1 |
| 1841820 |    4239 | 2024-11-28 19:57:37 | TRANSLATE WORDS IN EXERCISE | rejoindre  |    2408666 | Spell_What_You_Hear    |              1 |
| 1841821 |    4239 | 2024-11-28 19:57:45 | TRANSLATE WORDS IN EXERCISE | la         |    2408666 | Spell_What_You_Hear    |              1 |
| 1841822 |    4239 | 2024-11-28 19:58:08 | TRANSLATE WORDS IN EXERCISE | matches    |    2408666 | Spell_What_You_Hear    |              1 |
| 1841823 |    4239 | 2024-11-28 19:58:16 | COMPLETED EXERCISES         |            |       NULL | UMR                    |              0 |
| 1841825 |    4239 | 2024-11-28 19:58:16 | AUDIO_DISABLE               | 496446     |       NULL |                        |              0 |
| 1841826 |    4239 | 2024-11-28 19:58:16 | AUDIO_DISABLE               | 496446     |       NULL |                        |              0 |
| 1841827 |    4239 | 2024-11-28 19:58:16 | AUDIO_DISABLE               | 496446     |       NULL |                        |              0 |
| 1841828 |    4239 | 2024-11-28 19:58:16 | AUDIO_DISABLE               | 496446     |       NULL |                        |              0 |
| 1841824 |    4239 | 2024-11-28 19:58:17 | AUDIO_DISABLE               | 496446     |       NULL |                        |              0 |
| 1841830 |    4239 | 2024-11-28 20:13:23 | UD - USER DASHBOARD OPEN    |            |       NULL |                        |              0 |
| 1841831 |    4239 | 2024-11-28 20:14:20 | TRANSLATE WORDS IN EXERCISE | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841838 |    4239 | 2024-11-28 20:14:21 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841837 |    4239 | 2024-11-28 20:14:22 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841836 |    4239 | 2024-11-28 20:14:23 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841832 |    4239 | 2024-11-28 20:14:24 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841833 |    4239 | 2024-11-28 20:14:25 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841834 |    4239 | 2024-11-28 20:14:26 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841835 |    4239 | 2024-11-28 20:14:26 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841839 |    4239 | 2024-11-28 20:14:27 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841840 |    4239 | 2024-11-28 20:14:27 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841843 |    4239 | 2024-11-28 20:14:28 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841842 |    4239 | 2024-11-28 20:14:29 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841844 |    4239 | 2024-11-28 20:14:30 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841845 |    4239 | 2024-11-28 20:14:30 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841846 |    4239 | 2024-11-28 20:14:30 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841841 |    4239 | 2024-11-28 20:14:31 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841847 |    4239 | 2024-11-28 20:14:32 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841848 |    4239 | 2024-11-28 20:14:32 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841849 |    4239 | 2024-11-28 20:14:32 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841850 |    4239 | 2024-11-28 20:14:33 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841851 |    4239 | 2024-11-28 20:14:34 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841855 |    4239 | 2024-11-28 20:14:35 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841856 |    4239 | 2024-11-28 20:14:35 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841852 |    4239 | 2024-11-28 20:14:36 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841853 |    4239 | 2024-11-28 20:14:36 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841854 |    4239 | 2024-11-28 20:14:37 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841857 |    4239 | 2024-11-28 20:14:38 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841858 |    4239 | 2024-11-28 20:14:39 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841859 |    4239 | 2024-11-28 20:14:40 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841860 |    4239 | 2024-11-28 20:14:40 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841861 |    4239 | 2024-11-28 20:14:41 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841862 |    4239 | 2024-11-28 20:14:42 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841863 |    4239 | 2024-11-28 20:14:43 | SPEAK TEXT                  | rappel,    |    2454972 | Select_L2W_fitting_L2T |              1 |
| 1841868 |    4239 | 2024-11-28 20:34:11 | UD - USER DASHBOARD OPEN    |            |       NULL |                        |              0 |
tfnribeiro commented 2 days ago

So starting by the ActivityTimer, I had a look at it, and I am trying to understand exactly how the onIdle gets called by the libraries useEffect. What I suspect happens is that the user alt+tabs and I can see there is a throttle (500ms) which maybe means that the event is not picked up on. If the user is then moving the mouse, the active timer will keep going despite the window not being focused. We do have a onFocus and onBlur, but I am not sure if that covers all the interactions. Again, I have seen this quite a few times myself when developing - mostly through alt+tabbing.

I wonder if removing onMouseMove from the events will already improve this since the timer would only restart if the user does a click / scroll, etc. 

Regarding the SPEAK TEXT events, it almost seems like the user clicked that word multiple times, not sure why - there shouldn't be a pronounciation sound as we have the pronounciation hard set to disabled. 

{00B65B0E-1B35-474D-9D68-DB34B3B1828A}

I found that we weren't checking if the word should be pronounced after the translation has been received: https://github.com/zeeguu/web/pull/642

Maybe the student just found the pronounciation fun for that word?