pub async fn course_completions_history(
conn: &mut PgConnection,
course_id: Uuid,
granularity: TimeGranularity,
time_window: u16,
) -> ModelResult<Vec<CountResult>>
Expand description
Get course completion counts with specified time granularity.
The time_window parameter controls how far back to look:
- For Year granularity: number of years
- For Month granularity: number of months
- For Day granularity: number of days