Assignment submissions with file upload #302

Openjbrennan wants to merge 3 commits into main from jb/assignment-submissions· opened 2 days ago
+84−1
jbrennan commented 2 days agoAuthor

Summary

Students can now hand in assignments through the API instead of emailing the instructor.

  • POST /courses/{course_id}/assignments/{assignment_id}/submissions (multipart: file, submitted_at, optional comment)
  • GET /courses/{course_id}/submissions/mine lists the caller's submissions for a course

The mobile app queues uploads while offline and sends them when it reconnects, so we take submitted_at from the client. Otherwise students on the train would be marked late for something they finished on time.

Files go to the private S3 bucket through the default storage, URLs are signed.

Testing

Uploaded PDFs and a zip from the mobile app on staging. Late submission is rejected when allow_late is off.

jbrennan added 3 commits 2 days ago
Add SubmissionOut schemab71f983
Add submissions router with upload endpointb81f99c
Register submissions routerb91f9b5

Review required

Review the changes, then submit to get graded.

Some checks haven’t completed yet

1 check: dojo / review-grader

Keyboard shortcuts

Site-wide

Focus the search bar
/
Show this dialog
?

Pull request

Move to the next file
j
Move to the previous file
k
Filter changed files
t
Comment on the selected lines
c
Select a range of lines
Shiftclick