Skip to main content

Module exercise_answer_upload_reaper

Module exercise_answer_upload_reaper 

Source
Expand description

Removes files uploaded to be named in an exercise answer that no submission was ever made from.

How long an upload is spared depends on its origin, since a native client uploads immediately before submitting while an iframe student may hold an upload for the length of an exam. The binding row is soft-deleted rather than removed so that a submit naming a reaped file can still answer upload_expired instead of the misleading unknown_upload.

Constantsยง

MAX_CONCURRENT_REAPS ๐Ÿ”’

Functionsยง

main
reap ๐Ÿ”’
reap_one ๐Ÿ”’
Retires the binding, removes the object, and only then soft-deletes the file_uploads row. Ok(false) means a submission came to reference the upload after get_reapable listed it, so it is no longer reapable.