Repository navigation
Avoid future submission timestamps in instructor LTI grade passback - #1699
Merged
bnmnetp merged 1 commit intoNov 22, 2026
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the instructor grade-passback timestamp update.
No open issues 🎉
What changed in this PR
Updates LTI 1.3 grade passback so instructor-entered grades submitted before an assignment deadline do not carry future submission timestamps that an LMS may reject.
Changes:
- Caps instructor
submittedAtat the earlier of the score timestamp or one minute before the deadline. - Updates function documentation to explain the timestamp rule.
- Expands tests for deadline boundaries, missing deadlines, and unchanged student-triggered behavior.
| File | Description |
|---|---|
| test/components/rsptx/lti1p3/test_score_updates.py | Adds parameterized coverage for instructor and student submission timestamps. |
| components/rsptx/lti1p3/core.py | Clamps instructor submission timestamps and documents the updated behavior. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trying to instructor grade before the deadline of an assignment pushes LTI grades, but they are likely to be rejected by LMS as they are future timestamped by the logic that ensures they are not marked as "late".
This changes the logic to set the timestamp to earlier of current or 1 minute before deadline.
This pull request updates the logic for reporting
submittedAttimestamps for LTI 1.3 grade passback, ensuring instructor-entered grades are never reported as future submissions and improving test coverage for various edge cases. The main changes clarify and enforce how submission times are set, especially around assignment deadlines, and expand the tests to cover more scenarios.LTI 1.3 submission timestamp handling:
_submitted_at_for_scoreto ensure instructor-triggered grades are never reported with asubmittedAtlater than the actual score timestamp, preventing issues with LMSs that reject future submission times. The timestamp is now clamped to one minute before the deadline or the score timestamp, whichever is earlier.attempt_lti1p3_score_update,attempt_lti1p3_score_updates,attempt_lti1p3_score_updates_for,_send_lti1p3_score_updates) to clearly explain the new logic for instructor-triggered grade submission times. [1] [2] [3] [4]Test improvements:
test_score_updates.pyto cover a variety of deadline and submission scenarios, including deadlines in the past, at the current time, within the final minute, and with no deadline. Tests now ensure that instructor-triggered submissions never report a futuresubmittedAtand that student-triggered submissions use the score timestamp as expected.