SubmissionService#

class SubmissionService[source]#

Methods

create_proxy

Create a proxy to view the files of the given submission through.

get

Get the given submission (also called work) by id.

delete

Delete a submission and all its files.

patch

Update the given submission with new values.

delete_grader

Change the assigned grader of the given submission.

patch_grader

Change the assigned grader of the given submission.

get_feedback

Get all feedback for a submission

get_grade_history

Get the grade history for the given submission.

get_root_file_trees

Get all the file trees of a submission.

get_rubric_result

Get the full rubric result of the given submission (work).

patch_rubric_result

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:
Returns:

The created proxy.

Return type:

Proxy

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 submission

  • type (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:

ExtendedWork | MirrorFileResult

delete(*, submission_id, extra_parameters=None)[source]#

Delete a submission and all its files.

Parameters:
  • submission_id (int) – The submission to delete.

  • 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.

Returns:

Nothing

Return type:

None

patch(json_body, *, submission_id, extra_parameters=None)[source]#

Update the given submission with new values.

Parameters:
Returns:

The updated submission.

Return type:

ExtendedWork

delete_grader(*, submission_id, extra_parameters=None)[source]#

Change the assigned grader of the given submission.

Parameters:
  • 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.

Returns:

Empty response and a 204 status.

Return type:

None

patch_grader(json_body, *, submission_id, extra_parameters=None)[source]#

Change the assigned grader of the given submission.

Parameters:
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:

FeedbackWithReplies | FeedbackWithoutReplies

get_grade_history(*, submission_id, extra_parameters=None)[source]#

Get the grade history for the given submission.

Parameters:
Returns:

All the GradeHistory objects, which describe the history of this grade.

Return type:

Sequence[GradeHistory]

get_root_file_trees(*, submission_id, extra_parameters=None)[source]#

Get all the file trees of a submission.

Parameters:
Returns:

The student and teacher file tree, from the base/root directory of the submission.

Return type:

RootFileTreesJSON

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:

WorkRubricResultAsJSON

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:
Returns:

The work of which you updated the rubric items.

Return type:

ExtendedWork