Skip to main content

get_exercises_with_submissions

Function get_exercises_with_submissions 

Source
async fn get_exercises_with_submissions(
    exercise_ids: Json<Vec<Uuid>>,
    page_id: Path<Uuid>,
    pool: Data<PgPool>,
    user: AuthUser,
) -> ControllerResult<Json<Vec<Uuid>>>
Expand description

POST /api/v0/cms/pages/:page_id/exercises-with-submissions - Given a set of exercise ids, returns the subset that has at least one existing submission. Used by the editor to warn the teacher before saving a page edit that would remove one of these exercises, since that soft-deletes it and orphans its submissions.