pub async fn get_exercise_ids_with_any_submissions(
conn: &mut PgConnection,
page_id: Uuid,
exercise_ids: &[Uuid],
) -> ModelResult<Vec<Uuid>>Expand description
Of the given exercises, the ones with at least one existing submission from any user.
Used to warn a teacher before saving a page edit that would drop one of these exercises: the
exercise gets soft-deleted by exercises::delete_exercises_by_page_id, which orphans the
submissions behind the deleted_at filter instead of removing them (course-improvements-issues#146).