Skip to main content

confirm_cheater_by_user_id_and_course_id

Function confirm_cheater_by_user_id_and_course_id 

Source
pub async fn confirm_cheater_by_user_id_and_course_id(
    conn: &mut PgConnection,
    user_id: Uuid,
    course_id: Uuid,
) -> ModelResult<SuspectedCheaters>
Expand description

Confirms that a student cheated and applies the consequence: their completions in the course are failed (passed = false, grade = 0), with the previous values snapshotted so the confirmation can be undone by dismiss_by_user_id_and_course_id. Atomic.