leafo / sightreading.training

🎹 Sight reading training tool
http://sightreading.training
445 stars 77 forks source link

Stats not working? #59

Open ddTech opened 5 years ago

ddTech commented 5 years ago

I'm using this cool app for a few weeks now, always logged in, but the stats just show a flat line.

looking into the network traffic I see that the call to /stats.json?offset=-120 does not get data in return but an error message instead The response is {"errors":["offset must be an integer"]}

seems that the server uses the parameter without conversion.

regards Frank

JanRuettinger commented 5 years ago

Awesome app! Would be cool if you fix the stats!

ddTech commented 4 years ago

I also found that the transmission of hits and misses stops once "clear results" has been clicked. This happens because

_this5.setState({ stats: new _note_stats2.default() });

also resets the .currentUser to nothing which is the cause that .flushLater() never arms the timer : if (!this.currentUser) { return; }

changing the setState call to

return _this5.setState({ stats: new _note_stats2.default(N.session.currentUser) });

does the cure.

regards

Frank

jamesdeluk commented 2 years ago

Was this ever fixed? I see this is still Open. The Stats page (https://sightreading.training/stats) doesn't seem to record the stats. The stats on the Staff page do work - they're just not saved onto the Stats page (regardless of whether the clear results button is clicked or not).