Submission
- class canvasapi.submission.Submission(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- create_submission_peer_review(user, **kwargs)
Create a peer review for this submission.
- Calls:
POST /api/v1/courses/:course_id/assignments/:assignment_id/ submissions/:submission_id/peer_reviews
- Parameters:
user (
canvasapi.user.Useror int) – The user object or ID to retrieve notifications for.- Return type:
canvasapi.peer_review.PeerReview
- delete_submission_peer_review(user, **kwargs)
Delete a peer review for this submission.
- Calls:
- Parameters:
user (
canvasapi.user.Useror int) – The user object or ID to retrieve notifications for.- Return type:
canvasapi.peer_review.PeerReview
- edit(**kwargs)
Comment on and/or update the grading for a student’s assignment submission.
- get_submission_peer_reviews(**kwargs)
Get a list of all Peer Reviews this submission.
- Calls:
GET /api/v1/courses/:course_id/assignments/:assignment_id/ submissions/:submission_id/peer_reviews
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.peer_review.PeerReview
- mark_read(**kwargs)
Mark submission as read. No request fields are necessary.
- Calls:
PUT /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/read
- Returns:
True if successfully marked as read.
- Return type:
bool
- mark_unread(**kwargs)
Mark submission as unread. No request fields are necessary.
- Calls:
DELETE /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/read
- Returns:
True if successfully marked as unread.
- Return type:
bool
- upload_comment(file: PathLike | str | IOBase | FileIO, **kwargs)
Upload a file to attach to this submission as a comment.
- Calls:
POST /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/comments/files
- Parameters:
file (file or str) – The file or path of the file to upload.
- Returns:
True if the file uploaded successfully, False otherwise, and the JSON response from the API.
- Return type:
tuple