Endpoint for skills on my progress - #808
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #808 +/- ##
==========================================
+ Coverage 40.89% 40.96% +0.07%
==========================================
Files 550 550
Lines 23504 23540 +36
Branches 2831 2834 +3
==========================================
+ Hits 9611 9644 +33
- Misses 13026 13027 +1
- Partials 867 869 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| DATE_TRUNC('month', timestamp::DATE) AS dt, | ||
| COUNT(1) AS cnt | ||
| FROM skills_question_attempts | ||
| WHERE user_id = ? AND timestamp >= ? AND skill_id = ? AND LENGTH(question_attempt->>'result') > 0 |
There was a problem hiding this comment.
This query is complex!
Why do we need the length verification of attempts? I thought each attempt was stored separately, and surely we don't store empty attempts since even sending them to the API would waste bandwidth, server resources and time?
There was a problem hiding this comment.
@jacbn has also raised this! #798 (comment). I wanted to record empty attempts because I wanted us to later have the option to be strict about also counting these. What the strict thing is depends will depend on the target. If it's something like "number of attempts", where the target is in the numerator, the strict thing to do is to drop these. If it's something like "percentage of correct attempts", where the total number is in the denominator, the strict thing to do is to keep these.
Are you worried about how this query might perform or whether the empty attempts will take up too much space in the database?
There was a problem hiding this comment.
@jsharkey13 and I have agreed to stop recording empty attempts. The Anvil app should stop sending these, and the API shouldn't allow any. Recording empty attempts is not an effective way to protect against a user that only wants to submit easy answers, as they could just refresh the page.
|
We'll apply the suggested changes as a separate refactor. |
This adds an endpoint to show skills on My Progress.
It's just the one app for now, and given how close the symposium is, the following are hardcoded:
Pull Request Check List