Function get_student_enrollments_by_country

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

GET /api/v0/main-frontend/{course_id}/stats/student-enrollments-by-country/{granularity}/{time_window}/{country}

Returns student signup statistics grouped by country with the specified time granularity.

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