Assignment#

class Assignment[source]#

The serialization of an assignment.

See the comments in the source code for the meaning of each field.

id: int#

The id of the assignment.

state: Literal['done', 'grading', 'hidden', 'submitting']#

Current state of the assignment. Deprecated: use availability and grade_availability fields, it will be removed in Q3 2023.

description: Optional[str]#

Description of the assignment. Deprecated, use available routes to upload and retrieve a description file instead. It will be removed in Q3 2023.

has_description: bool#

Whether the assignment has liked description file.

created_at: datetime#

When this assignment was created.

name: str#

The name of the assignment.

is_lti: bool#

Is this an LTI assignment.

course_id: int#

Course of this assignment.

cgignore: Union[SubmissionValidatorInputData, str, None]#

The cginore.

cgignore_version: Optional[CGIgnoreVersion]#

The version of the cignore file.

available_at: Optional[datetime]#

The time the assignment will become available (i.e. the state will switch from ‘hidden’ to ‘open’). If the state is not ‘hidden’ this value has no meaning. If this value is not None you cannot change to state to ‘hidden’ or ‘open’. Deprecated: use availability and grade_availability fields, it will be removed in Q3 2023.

Should we send login links to all users before the available_at time.

fixed_max_rubric_points: Optional[float]#

The fixed value for the maximum that can be achieved in a rubric. This can be higher and lower than the actual max. Will be None if unset.

max_grade: float#

The maximum grade you can get for this assignment. This is based around the idea that a 10 is a ‘perfect’ score. So if this value is 12 a user can score 2 additional bonus points. If this value is None it is unset and regarded as a 10.

grading: Union[AssignmentPointsGradingSettings, AssignmentPercentageGradingSettings]#

Settings that influence how the grade for a submission can be determined. TODO: Should we also move max_grade and/or fixed_max_rubric_points to the grading object?

group_set: Optional[GroupSet]#

The group set of this assignment. This is None if this assignment is not a group assignment.

auto_test_id: Optional[int]#

The id of the AutoTest configuration connected to this assignment. This will always be given if there is a configuration connected to this assignment, even if you do not have permission to see the configuration itself.

files_upload_enabled: bool#

Can you upload files to this assignment.

webhook_upload_enabled: bool#

Can you connect git to this assignment. Deprecated, use webhook_configuration instead.

webhook_configuration: Union[WebhookConfigurationEnabledAsJSON, WebhookConfigurationDisabledAsJSON]#

Settings for the git connection to this assignment.

editor_upload_enabled: bool#

Can you use the editor for this assignment.

max_submissions: Optional[int]#

The maximum amount of submission a student may create, inclusive. The value null indicates that there is no limit.

cool_off_period: timedelta#

The time period in which a person can submit at most amount_in_cool_off_period amount.

amount_in_cool_off_period: int#

The maximum amount of time a user can submit within amount_in_cool_off_period. This value is always greater than or equal to 0, if this value is 0 a user can submit an unlimited amount of time.

reminder_time: Optional[str]#

The moment reminder emails will be sent. This will be None if you don’t have the permission to see this or if it is unset.

lms_name: Optional[str]#

The LMS providing this LTI assignment.

peer_feedback_settings: Optional[AssignmentPeerFeedbackSettings]#

The peer feedback settings for this assignment. If null this assignment is not a peer feedback assignment.

done_type: Optional[str]#

The kind of reminder that will be sent. If you don’t have the permission to see this it will always be null. If this is not set it will also be null.

done_email: Optional[str]#

The email where the done email will be sent to. This will be null if you do not have permission to see this information.

division_parent_id: Optional[int]#

The assignment id of the assignment that determines the grader division of this assignment. This will be null if you do not have permissions to see this information, or if no such parent is set.

analytics_workspace_ids: Sequence[int]#

The ids of the analytics workspaces connected to this assignment. WARNING: This API is still in beta, and might change in the future.

kind: AssignmentKind#

What kind of assignment is this.

anonymized_grading: Optional[AssignmentAnonymizationAlgo]#

The anonymization algorithm used for this assignment.

file_to_load_first: Optional[str]#

Optionally a glob for a file that should be loaded first in the file viewer. There is no guarantee that any file actually matches this glob.

grade_availability: FixedGradeAvailability#

What is grade availability of this assignment.

has_multiple_timeframes: bool#

Does this assignment have multiple timeframes.

submission_mode: AssignmentSubmissionMode#

Which submission mode is set for the assignment.

availability: Union[FixedAvailability, TimedAvailability]#

What is the availability state of this assignment.

deadline: Optional[datetime]#

The deadline of the assignment. It is possible the assignment has no deadline yet, in which case it will be None.

lock_date: Optional[datetime]#

The moment this assignment locks, this can be seen as a form of second deadline.