Skip to content

feat(submissions): instructor-facing enhancements - #8551

Merged
adi-herwana-nus merged 1 commit into
masterfrom
adi/timed-submission-instructor-fixes
Aug 17, 2026
Merged

feat(submissions): instructor-facing enhancements#8551
adi-herwana-nus merged 1 commit into
masterfrom
adi/timed-submission-instructor-fixes

Conversation

@adi-herwana-nus

Copy link
Copy Markdown
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_at to 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.

@adi-herwana-nus
adi-herwana-nus merged commit 9d6e5bd into master Aug 17, 2026
15 checks passed
@adi-herwana-nus
adi-herwana-nus deleted the adi/timed-submission-instructor-fixes branch August 17, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants