Index: openacs-4/packages/proctoring-support/tcl/proctoring-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/tcl/Attic/proctoring-procs.tcl,v diff -u -r1.1.2.17 -r1.1.2.18 --- openacs-4/packages/proctoring-support/tcl/proctoring-procs.tcl 10 Feb 2022 13:54:33 -0000 1.1.2.17 +++ openacs-4/packages/proctoring-support/tcl/proctoring-procs.tcl 10 Feb 2022 16:31:03 -0000 1.1.2.18 @@ -337,3 +337,24 @@ artifact_id $artifact_id \ file $file_path] } + +ad_proc ::proctoring::artifact::delete { + -object_id:required + {-user_id ""} +} { + Delete proctoring artifacts. + + @param object_id proctored object id + @param user_id user the artifact was collected for. +} { + ::xo::dc dml -prepare { + integer text integer + } delete { + delete from proctoring_object_artifacts + where object_id = :object_id + and (coalesce(:user_id, '') = '' or user_id = :user_id) + } + ::proctoring::delete \ + -object_id $object_id \ + -user_id $user_id +}