headless_lms_server::controllers::main_frontend::courses::stats

Function get_course_completions_history

Source
async fn get_course_completions_history(
    pool: Data<PgPool>,
    user: AuthUser,
    path: Path<(Uuid, TimeGranularity, u16)>,
    cache: Data<Cache>,
) -> ControllerResult<Json<Vec<CountResult>>>
Expand description

GET /api/v0/main-frontend/{course_id}/stats/all-language-versions/completions-history/{granularity}/{time_window}

Returns completion statistics for all language versions with specified time granularity and window.

  • granularity: “year”, “month”, or “day”
  • time_window: number of time units to look back