Skip to main content

Module exercise_task_submission_files

Module exercise_task_submission_files 

Source
Expand description

Which host-stored files a task submission was made from.

The exercise service’s answer is an opaque blob, so the host cannot recover a submission’s files by reading it. Recording the association at submit time is what lets the host serve those files back without interpreting any plugin’s answer shape.

Structs§

ExerciseAnswerFile
One file of one file-typed answer to an exercise, for the teacher bulk download.
SubmissionFile
One file of a task submission, joined with the file_uploads row it points at.

Functions§

delete_by_task_submission_and_file_upload_ids
Soft-deletes one submission-to-file link, leaving both the submission and the upload alone.
exercise_has_answer_files
Whether the exercise has at least one file-typed answer whose files still exist.
get_answer_files_by_exercise_id
Every file of every file-typed answer to the exercise, ordered by user, then submission time, then the order the client sent the files in.
get_by_task_submission_ids
The files of the given task submissions, ordered by submission and then by the order the client sent them in. Soft-deleted files are omitted, so a reaped upload simply disappears from the listing.
get_positions_by_task_submission_id
The files a submission recorded, paired with their positions, in stored order.
insert_many
Records the files a task submission was made from, in the order the client sent them.