Skip to content

[Feature:InstructorUI] Due Date Constraints#12741

Merged
bmcutler merged 9 commits into
mainfrom
due-date-constraints
Apr 10, 2026
Merged

[Feature:InstructorUI] Due Date Constraints#12741
bmcutler merged 9 commits into
mainfrom
due-date-constraints

Conversation

@Christian2147

Copy link
Copy Markdown
Contributor

CAUTION: Since this PR removes a date constraint, if it is installed on a production system and then needs to be reverted after a moderate period of time where gradeables might have been created/edited and taking advantage of the more flexible date settings, rolling back / reverting the change might fail.

Why is this Change Important & Necessary?

Partially addresses #12349

This PR specifically removes all constraints for the Due date for gradeables. This is important and necessary because instructors felt that the current UI for setting dates on gradeables was confusing, and they want to have more freedom over what dates they set for gradeables, even if they are invalid, since a lot of those dates may not matter for the specific class or assignment.

What is the New Behavior?

Now, the Due date has no constraints, it can be set to whatever date regardless of other dates. When one of the lower dates is set to before the present day and the Due date is set to the future, the lower date wins when assigning a gradeable status on the gradeables page.

Previously, the due date had a constraint. It could not be set after the manual grading start date, otherwise its box would turn red and changes would fail to save, as shown in this photo:
{CE0553BC-AD54-4D4C-A77C-EAD069751FDB}

Now, when the Due date is ahead of one of the dates below it, such as the grading start date, or if any other dates are conflicting with each other, it will display messages/warnings like the ones shown here:
{477C9DA2-E463-4589-9F1F-B6410FDAC7EC}

Additionally, when the Due date is in the future, and the grading start date is in the past, the grading start date wins and the assignment shows as grading in progress. This is also true for all dates below the Due date.

What steps should a reviewer take to reproduce or test the bug or new feature?

Log in as instructor. Go to the sample course, try editing all gradeables and try changing their due date in all different combinations. Make sure that not only can the date be changed to any valid date, but also that the listing of the gradeable on the gradeables page is valid. For example, if grading start date is in the past, and due in the future, then the assignment should show under GRADING, not under FUTURE, not under BETA, not under OPEN, and not under CLOSED.

Secondly, On the gradeable page, make sure all the buttons are visible and function properly. For example, if the assignment shows as OPEN, CLOSED (past due), or GRADING (Grading in progress), all appropriate buttons should be visible and should function like normal.

Finally, go to a gradeable labeled FUTURE and a gradeable labeled BETA and try to copy the link. Then log out and log in as a student and try to paste the link. You should NOT be able to access the gradeable. If you can, please report it immediately.

Note: While testing, the only dates that should have full free access to be changed without causing any constraint issues currently are the grade inquiry dates, the ta view date, the open submission date, and the due date. The rest of the dates still have constraints on them.

Automated Testing & Documentation

This feature is sufficiently tested by unit tests and cypress tests. Cypress tests have been added to ensure that the gradables are visible to the proper users when the Due date is changed along with the other dates, especially in ways that would previously violate a constraint. I have not updated lab gradeable dates cypress tests, since those gradeables do not have a due date option.

Other information

This is not a breakage change.
Link hijacking might be a security concern with this PR and should be tested. Ensure that ONLY instructors have access to FUTURE gradeables and instructors and TAs/Mentors have access to BETA gradeables.

@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Apr 3, 2026
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Apr 3, 2026
@codecov

codecov Bot commented Apr 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.64%. Comparing base (5d7b1fc) to head (569eeb0).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #12741      +/-   ##
============================================
- Coverage     21.64%   21.64%   -0.01%     
  Complexity     9654     9654              
============================================
  Files           268      268              
  Lines         36244    36242       -2     
  Branches        487      487              
============================================
- Hits           7845     7843       -2     
  Misses        27916    27916              
  Partials        483      483              
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.66% <0.00%> (-0.01%) ⬇️
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JManion32

Copy link
Copy Markdown
Contributor

@Christian2147 This is failing 2 Gradeable tests. Please resolve before we review.

@Rkoester47 Rkoester47 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.

I tested the functionality of this PR and it seems to be working as described. I was unable to find any errors or break any features, and all previous functionality remains intact. I was not able to access inaccessible gradeables as a student using links.

As @JManion32 said previously, please address the failing Gradeable CI tests so that we can review properly.

Grade date should not fail to save if its before the due date anymore.

@Farhanxikram Farhanxikram left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Functionality review. I changed various assignment dates and everything seemed to follow the expected behavior. I wasn't able to find any bugs.
OS: Windows
Browser: Chrome

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Apr 7, 2026
Fixed an issue where student couldnt view the gradeable if all dates but the grading start date was in the future.

@Rkoester47 Rkoester47 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.

I tested the changes on the PR and they do behave as described. All of the date constraints you mentioned work freely now, and gradeables are able to switch between categories appropriately. Also, restricted gradeables are not reachable via link by students. No functionality of these pages from before this PR seem to have been impacted. Now that all tests are passing I approve this PR.

@bmcutler
bmcutler merged commit 7c55630 into main Apr 10, 2026
25 checks passed
@bmcutler
bmcutler deleted the due-date-constraints branch April 10, 2026 20:25
GarvitKhandelwal31 pushed a commit to GarvitKhandelwal31/Submitty that referenced this pull request Apr 13, 2026
### CAUTION: Since this PR removes a date constraint, if it is installed
on a production system and then needs to be reverted after a moderate
period of time where gradeables might have been created/edited and
taking advantage of the more flexible date settings, rolling back /
reverting the change might fail.

### Why is this Change Important & Necessary?
Partially addresses Submitty#12349

This PR specifically removes all constraints for the Due date for
gradeables. This is important and necessary because instructors felt
that the current UI for setting dates on gradeables was confusing, and
they want to have more freedom over what dates they set for gradeables,
even if they are invalid, since a lot of those dates may not matter for
the specific class or assignment.

### What is the New Behavior?
Now, the Due date has no constraints, it can be set to whatever date
regardless of other dates. When one of the lower dates is set to before
the present day and the Due date is set to the future, the lower date
wins when assigning a gradeable status on the gradeables page.

Previously, the due date had a constraint. It could not be set after the
manual grading start date, otherwise its box would turn red and changes
would fail to save, as shown in this photo:
<img width="1923" height="1144"
alt="{CE0553BC-AD54-4D4C-A77C-EAD069751FDB}"
src="https://github.com/user-attachments/assets/df32ed0e-027a-47aa-a3d9-61850e586914"
/>

Now, when the Due date is ahead of one of the dates below it, such as
the grading start date, or if any other dates are conflicting with each
other, it will display messages/warnings like the ones shown here:
<img width="2972" height="1894"
alt="{477C9DA2-E463-4589-9F1F-B6410FDAC7EC}"
src="https://github.com/user-attachments/assets/bf37268c-0a8b-485c-ae1e-7661df50f226"
/>

Additionally, when the Due date is in the future, and the grading start
date is in the past, the grading start date wins and the assignment
shows as grading in progress. This is also true for all dates below the
Due date.

### What steps should a reviewer take to reproduce or test the bug or
new feature?
Log in as instructor. Go to the sample course, try editing all
gradeables and try changing their due date in all different
combinations. Make sure that not only can the date be changed to any
valid date, but also that the listing of the gradeable on the gradeables
page is valid. For example, if grading start date is in the past, and
due in the future, then the assignment should show under GRADING, not
under FUTURE, not under BETA, not under OPEN, and not under CLOSED.

Secondly, On the gradeable page, make sure all the buttons are visible
and function properly. For example, if the assignment shows as OPEN,
CLOSED (past due), or GRADING (Grading in progress), all appropriate
buttons should be visible and should function like normal.

Finally, go to a gradeable labeled FUTURE and a gradeable labeled BETA
and try to copy the link. Then log out and log in as a student and try
to paste the link. You should NOT be able to access the gradeable. If
you can, please report it immediately.

Note: While testing, the only dates that should have full free access to
be changed without causing any constraint issues currently are the grade
inquiry dates, the ta view date, the open submission date, and the due
date. The rest of the dates still have constraints on them.

### Automated Testing & Documentation
This feature is sufficiently tested by unit tests and cypress tests.
Cypress tests have been added to ensure that the gradables are visible
to the proper users when the Due date is changed along with the other
dates, especially in ways that would previously violate a constraint. I
have not updated lab gradeable dates cypress tests, since those
gradeables do not have a due date option.

### Other information
This is not a breakage change.
Link hijacking might be a security concern with this PR and should be
tested. Ensure that ONLY instructors have access to FUTURE gradeables
and instructors and TAs/Mentors have access to BETA gradeables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants