assessments.late_assignment
assessments.late_assignment(raw_grade, late_count, is_lower_stakes=False)This function evaluates a late submission according to the program policy. For higher-stakes assessments, the grade is scaled based on the cumulative number of late submissions. For lower-stakes assessments, late submissions are not accepted and receive a grade of zero.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| raw_grade | float or int | The original grade before applying any late-submission penalty. | required |
| late_count | int | The number of late submissions prior to this one. | required |
| is_lower_stakes | bool | Indicates whether the assessment is lower-stakes. If True, the late submission is not accepted and receives zero points. Default is False. | False |
Returns
| Name | Type | Description |
|---|---|---|
| float | The final grade after applying the late-submission scaling. |
Notes
Late submissions for higher-stakes assessments follow this policy: - 1st late submission: 75% of the original grade - 2nd–5th late submissions: 50% of the original grade - 6th or later: 0 points
Late submissions for lower-stakes assessments do not count toward the cumulative late count and always receive 0 points.
Examples
Higher-stakes assignment, first late submission:
>>> late_assignment(80, 0)
Status: Late (1st occurrence)
Late count: 1
Scaling factor: 0.75
60.0Lower-stakes assignment, any late submission:
>>> late_assignment(90, 2, is_lower_stakes=True)
Status: Late not accepted (lower-stakes)
Late count: 2
Scaling factor: 0.0
0.0
0.0