SubmissionService#
- class SubmissionService[source]#
Methods
Create a proxy to view the files of the given submission through.
Get the given submission (also called work) by id.
Delete a submission and all its files.
Update the given submission with new values.
Change the assigned grader of the given submission.
Change the assigned grader of the given submission.
Get all feedback for a submission
Get the grade history for the given submission.
Get all the file trees of a submission.
Get the rubric results of a submission.
Select the given rubric items for the given submission.
- create_proxy(json_body, *, submission_id)[source]#
Create a proxy to view the files of the given submission through.
This allows you to view files of a submission without authentication for a limited time.
- Parameters:
json_body (
CreateProxySubmissionData
) – The body of the request. SeeCreateProxySubmissionData
for information about the possible fields. You can provide this data as aCreateProxySubmissionData
or as a dictionary.submission_id (
int
) – The submission for which the proxy should be created.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The created proxy.
- Return type:
- get(*, submission_id, type='default', owner='auto')[source]#
Get the given submission (also called work) by id.
- Parameters:
submission_id (
int
) – The id of the submissiontype (
Literal
['default'
,'feedback'
,'zip'
]) – If passed this cause you not to receive a submission object. What you will receive will depend on the value passed. If you pass zip you will receive a zip file with all the files of the submission. If you pass feedback you will receive a text file with a textual representation of all the feedback given on this submission.owner (
Literal
['auto'
,'student'
,'teacher'
]) – This query parameter is only used when type==’zip’. It will determine which revision is used to generate the zip file.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The requested submission, or one of the other types as requested by the type query parameter.
- Return type:
- delete(*, submission_id)[source]#
Delete a submission and all its files.
- Parameters:
submission_id (
int
) – The submission to delete.- Returns:
Nothing
- Return type:
None
- patch(json_body, *, submission_id)[source]#
Update the given submission with new values.
- Parameters:
json_body (
PatchSubmissionData
) – The body of the request. SeePatchSubmissionData
for information about the possible fields. You can provide this data as aPatchSubmissionData
or as a dictionary.submission_id (
int
) – The id of the submission.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The updated submission.
- Return type:
- delete_grader(*, submission_id)[source]#
Change the assigned grader of the given submission.
- Parameters:
submission_id (
int
) – The id of the submission.- Returns:
Empty response and a 204 status.
- Return type:
None
- patch_grader(json_body, *, submission_id)[source]#
Change the assigned grader of the given submission.
- Parameters:
json_body (
PatchGraderSubmissionData
) – The body of the request. SeePatchGraderSubmissionData
for information about the possible fields. You can provide this data as aPatchGraderSubmissionData
or as a dictionary.submission_id (
int
) – The id of the submission.self (SubmissionService[AuthenticatedClient]) –
- Returns:
Empty response and a 204 status.
- Return type:
None
- get_feedback(*, submission_id, with_replies=False)[source]#
Get all feedback for a submission
- Parameters:
submission_id (
int
) – The submission of which you want to get the feedback.with_replies (
bool
) – Do you want to include replies in with your comments? Starting with version “O.1” the default value will change to True.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The feedback of this submission.
- Return type:
- get_grade_history(*, submission_id, page_size=20)[source]#
Get the grade history for the given submission.
- Parameters:
submission_id (
int
) – The submission for which you want to get the grade history.page_size (
int
) – The size of a single page, maximum is 50.self (SubmissionService[AuthenticatedClient]) –
- Returns:
All the GradeHistory objects, which describe the history of this grade.
- Return type:
Response[GradeHistory]
- get_root_file_trees(*, submission_id)[source]#
Get all the file trees of a submission.
- Parameters:
submission_id (
int
) – The id of the submission of which you want to get the file trees.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The student and teacher file tree, from the base/root directory of the submission.
- Return type:
- get_all_rubric_results(*, submission_id, page_size=20)[source]#
Get the rubric results of a submission.
- Parameters:
submission_id (
int
) – The id of the submissionpage_size (
int
) – The size of a single page, maximum is 50.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The rubric results that are requested.
- Return type:
Response[WorkRubricItem]
- put_rubric_result(json_body, *, submission_id, copy_locked_items=False)[source]#
Select the given rubric items for the given submission.
- Parameters:
json_body (
PutRubricResultSubmissionData
) – The body of the request. SeePutRubricResultSubmissionData
for information about the possible fields. You can provide this data as aPutRubricResultSubmissionData
or as a dictionary.submission_id (
int
) – The submission to unselect the item for.copy_locked_items (
bool
) – Should we maintain the selected items in locked rubric rows.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The work of which you updated the rubric items.
- Return type: