headless_lms_models::library::course_stats

Function get_total_users_started_course_by_instance

Source
pub async fn get_total_users_started_course_by_instance(
    conn: &mut PgConnection,
    course_id: Uuid,
) -> ModelResult<HashMap<Uuid, CountResult>>
Expand description

Total unique users in the course settings table, grouped by course instance.

Returns a HashMap where keys are course instance IDs and values are the total user counts for that instance.