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 full rubric result of the given submission (work).
Select the given rubric items for the given submission.
- create_proxy(json_body, *, submission_id, extra_parameters=None)[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 (
Union
[dict
,list
,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.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The created proxy.
- Return type:
- get(*, submission_id, type='default', owner='auto', extra_parameters=None)[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.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The requested submission, or one of the other types as requested by the type query parameter.
- Return type:
- patch(json_body, *, submission_id, extra_parameters=None)[source]#
Update the given submission with new values.
- Parameters:
json_body (
Union
[dict
,list
,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.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The updated submission.
- Return type:
- delete_grader(*, submission_id, extra_parameters=None)[source]#
Change the assigned grader of the given submission.
- patch_grader(json_body, *, submission_id, extra_parameters=None)[source]#
Change the assigned grader of the given submission.
- Parameters:
json_body (
Union
[dict
,list
,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.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SubmissionService[AuthenticatedClient]) –
- Returns:
Empty response and a 204 status.
- Return type:
None
- get_feedback(*, submission_id, with_replies=False, extra_parameters=None)[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.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The feedback of this submission.
- Return type:
- get_grade_history(*, submission_id, extra_parameters=None)[source]#
Get the grade history for the given submission.
- Parameters:
submission_id (
int
) – The submission for which you want to get the grade history.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SubmissionService[AuthenticatedClient]) –
- Returns:
All the GradeHistory objects, which describe the history of this grade.
- Return type:
- get_root_file_trees(*, submission_id, extra_parameters=None)[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.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The student and teacher file tree, from the base/root directory of the submission.
- Return type:
- get_rubric_result(*, submission_id, extra_parameters=None)[source]#
Get the full rubric result of the given submission (work).
- Parameters:
- Returns:
The rubric result of the given submission, which also contains the rubric.
- Return type:
- patch_rubric_result(json_body, *, submission_id, copy_locked_items=False, extra_parameters=None)[source]#
Select the given rubric items for the given submission.
- Parameters:
json_body (
Union
[dict
,list
,PatchRubricResultSubmissionData_1
,PatchRubricResultSubmissionData_1_2
]) – The body of the request. SeePatchRubricResultSubmissionData
for information about the possible fields. You can provide this data as aPatchRubricResultSubmissionData
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.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SubmissionService[AuthenticatedClient]) –
- Returns:
The work of which you updated the rubric items.
- Return type: