Expand description
Cross-course counts for /stats and /domain-stats.
Every “registered” number here comes from a registered_completions CTE spelling out the same
set: a completion is registered if a third-party registrar recorded it in
course_module_completion_registered_to_study_registries, or if a credit_registrations attempt
of ours reached registered, duplicate or not_improved. Every other credit registration
state leaves the credit’s fate unknown to us and must not be counted either way.
UNION, not UNION ALL, is what keeps the counts honest: one completion routinely has a row in
both ledgers, because our pipeline mirrors its successes into the legacy one, and several rows in
either — one per registrar there, one per attempt here after a regrade. Deduplicating on the
completion is also why a superseded attempt cannot inflate a count, and why a completion whose
successor attempt is still in flight keeps the credit its first attempt already earned.
Structs§
Functions§
- get_
completion_ stats_ by_ email_ domain - Produces a summary of course completions grouped by user’s email domain.
- get_
course_ completion_ stats_ for_ email_ domain - Gets course completion statistics for a specific email domain.
- get_
course_ module_ stats_ by_ completions_ registered_ to_ study_ registry - get_
number_ of_ people_ completed_ a_ course - get_
number_ of_ people_ done_ at_ least_ one_ exercise - get_
number_ of_ people_ registered_ completion_ to_ study_ registry - get_
number_ of_ people_ started_ course