pub async fn update_automatic_completion_status_and_grant_if_eligible(
    conn: &mut PgConnection,
    course_module: &CourseModule,
    course_instance_id: Uuid,
    user_id: Uuid
) -> ModelResult<()>
Expand description

Checks whether the course module can be completed automatically and creates an entry for completion if the user meets the criteria. Also re-checks module completion prerequisites if the module is completed.