feat(submissions): instructor-facing enhancements - #8551
Merged
Conversation
adi-herwana-nus
commented
Aug 17, 2026
Contributor
- hide "block submissions after deadline" switch when no end_at is configured
- instructors can always create submissions for testing
- (instructor) submissions created after deadline have no deadline enforcement
- hide "block submissions after deadline" switch when no end_at is configured - instructors can always create submissions for testing - (instructor) submissions created after deadline have no deadline enforcement
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines assessment submission deadline behavior to better support instructor workflows: it hides a deadline-related toggle when no end date exists, ensures staff can still initiate test attempts after deadlines, and prevents automatic deadline enforcement for those staff-created “post-deadline” attempts while preserving time-limit enforcement.
Changes:
- Update
Course::Assessment::Submission#force_submit_atto ignore an already-passed submission deadline when the submission was created after that deadline (e.g., staff test runs), while still enforcing time limits. - Align instructor-facing UI/API behavior so staff managers aren’t shown a “closed” state solely due to a passed deadline when they can still create attempts.
- Add/adjust specs to distinguish “started before deadline” vs “created after deadline” cases for force-submit scheduling and edit fail-safes.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| spec/models/course/assessment/submission_force_submit_spec.rb | Adds coverage for post-deadline-created submissions (deadline ignored) vs pre-deadline-created submissions (deadline enforced), plus time-limit behavior. |
| spec/jobs/course/assessment/submission/schedule_expiring_submissions_job_spec.rb | Ensures past-due scheduling tests model “begun before deadline” after the new force-submit logic. |
| spec/jobs/course/assessment/submission/force_submit_timed_submission_job_spec.rb | Adjusts setup so the tested submission is created before the passed deadline to remain force-submittable. |
| spec/controllers/course/assessment/submission/late_submission_spec.rb | Adds coverage ensuring staff-created post-deadline test attempts are not force-submitted by the edit fail-safe. |
| client/app/bundles/course/assessment/components/AssessmentForm/index.tsx | Hides the late-submission toggle when there’s no end date (since it has no effect). |
| app/views/course/assessment/assessments/_assessment_actions.json.jbuilder | Prevents “closed” status for staff managers when the deadline has passed, matching create authorization behavior. |
| app/models/course/assessment/submission.rb | Implements the core behavior change: ignore already-passed deadline when created_at > deadline, still applying time limit if present. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.