Skip to main content

Module exercise_task_submissions

Module exercise_task_submissions 

Source

Structs§

AggregatedAnswerFile 🔒
One file of an answer, as aggregated by a query that resolves its own files.
AnswerColumns 🔒
The columns a SubmittedAnswer writes, plus the files that must be recorded alongside them.
AnswerFields
A stored answer as the three fields every outbound type carries it in.
AnswerFile
One host-stored file that an answer consists of.
CsvExportRow 🔒
A CSV-export row before its answer’s files are resolved.
ExerciseTaskSubmission
ExerciseTaskSubmissionCsvExportData
One row for CSV export: a single attempt at an exercise task for a given exercise_slide_submission (chronological submission order).
ExportedCourseSubmission
ExportedSubmission
PeerOrSelfReviewsReceived
StoredAnswer
The stored form of one submission’s answer, before the files of a file answer are resolved.
SubmissionData
SubmissionGradingRef
A submission’s grading pointer, for callers that route gradings and never read the answer.
SubmissionRow 🔒
A submission row exactly as stored, with its files still unresolved.

Enums§

AnswerData
The answer a submission carries, as either the raw JSON a plugin produced or the files a plugin’s answer consists of.
AnswerKind
Which of a submission’s two answer representations is the answer: the opaque blob in data_json, or the rows in exercise_task_submission_files.

Functions§

answer_columns 🔒
Splits a submitted answer into the columns it is stored in. The ids are assumed to be uploads the submitter is allowed to name; this does not check that.
answer_from_aggregated_files 🔒
Builds the answer union from files the query aggregated itself, for streamed reads that cannot batch their rows.
attach_answer_data
Resolves stored answers into AnswerData in one batch, minting a download URL per file.
delete_by_id
Soft-deletes one task submission, leaving its slide submission alone.
get_answer_kind
Which representation holds a submission’s answer.
get_by_exercise_slide_submission_id
get_by_id
get_course_and_exam_id
get_csv_export_data_by_exercise_and_task
Fetches CSV-exportable rows at attempt granularity in intended ordering.
get_csv_export_data_by_exercise_and_task_latest_per_user
Fetches CSV-exportable rows for the latest submission per user only, ordered by submitted_at.
get_exercise_task_submission_info_by_exercise_slide_submission_id
Used to get the necessary info for rendering a submission either when we’re viewing a submission, or we’re conducting a peer review.
get_grading_ref
get_ids_by_exercise_id
get_latest_submission_ids_by_exercise_id
Similar to get_ids_by_exercise_id but returns the record with the highest created_at for a user_id
get_peer_reviews_received
get_submission
get_user_custom_view_exercise_tasks_by_module_and_exercise_type
get_user_latest_exercise_task_submissions_by_course_module_and_exercise_type
get all submissions for user and course module and exercise type
get_users_latest_exercise_task_submissions_for_exercise_slide
insert
Records a task submission and, for a file answer, the files that are the answer.
insert_with_id
resolve_csv_export_rows 🔒
resolve_row 🔒
resolve_rows 🔒
set_grading_id
shift_created_at
Moves a submission’s creation time by offset, which may be negative.
stream_course_submissions
stream_exam_submissions