Skip to content

[Feature:InstructorUI] Grading Open Date Constraints#12783

Merged
bmcutler merged 7 commits into
mainfrom
grading-start-date-constraints
Apr 30, 2026
Merged

[Feature:InstructorUI] Grading Open Date Constraints#12783
bmcutler merged 7 commits into
mainfrom
grading-start-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 Grading Open 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 Grading Open 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 Grading Open date is set to the future, the lower date wins when assigning a gradeable status on the gradeables page.

Previously, the manual grading open date had a constraint. It could not be set after the manual grading due date, otherwise its box would turn red and changes would fail to save. The photo below shows a previous example of this constraint:
{CE0553BC-AD54-4D4C-A77C-EAD069751FDB}

Now, when the Manual Grading Open date is ahead of one of the dates below it, such as the grading due date, or if any other dates are conflicting with each other, it will display messages/warnings like the ones shown here:
{6DB8E999-888B-4EC7-8A59-8B6BCFAAA014}

Additionally, when the Grading Open date is in the future, and the grading due date is in the past, the grading due date wins and the assignment shows as grading in progress with a red grade box signaling that it is past due. This is also true for all dates below the grading start 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 grading start 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 due date is in the past, and grading start date in the future, then the assignment should show under GRADING, not under FUTURE, not under BETA, not under OPEN, and not under CLOSED. The grade box may also show up as red if it is an electronic gradeable and there are ungraded assignments.

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, the due date, and the grading start 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 Grading Start date is changed along with the other dates, especially in ways that would previously violate a constraint. I have also added proper tests for lab gradeables along with regular electronic gradeables.

Other information

This is not a breakage change.
This PR does include a migration that remove a date constraint from the database, which may not be reversable.
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.

If grade start date after grade due date, display warning message
If the start date is after the due date, it will show the warning
Removed constraints for the grading open date.
Fixed open to grading now button and made sure the gradable is listed under the right category
Added cypress tests for both lab gradeables and electronic gradeables.
@codecov

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.51%. Comparing base (7c55630) to head (ca6b40e).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #12783      +/-   ##
============================================
- Coverage     21.66%   21.51%   -0.16%     
- Complexity     9754     9803      +49     
============================================
  Files           268      268              
  Lines         36456    37338     +882     
  Branches        487      490       +3     
============================================
+ Hits           7899     8033     +134     
- Misses        28074    28819     +745     
- Partials        483      486       +3     
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.02% <ø> (-0.03%) ⬇️
migrator 100.00% <ø> (ø)
php 20.55% <16.66%> (-0.14%) ⬇️
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.

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

The code itself looks good. One bug I noticed was that when I changed a date to be out of bounds and tried to change it back, the warning and the red highlight stays even if its consistent. I'm not sure if this issue relates to your commits or to the new merges because I was receiving a similar issue when I tested on the main.

In the example below I changed the grading due date to be in the year 2226, then I changed the inquiry dates to the year 9999, then I switched the grading due date back to 2026. Strange
Image
OS: Windows
Browser: Chrome

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

I did a functionality review and didn't find any issues, and as far as I could tell, prior functionality remained intact, and changes are as specified in the pr
Os: Windows
Browser:: Google

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Apr 17, 2026

@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 checked over the code and functionality for this PR and it all looks good to me. The changes all behaved as described and no functionality seems to have been impacted. I was able to change the Grading Open date, and the warning appeared when appropriate. The gradeable moved to the appropriate category, and I was still not able to access future/beta gradeables via a link with a student account.

@Christian2147

Copy link
Copy Markdown
Contributor Author

The code itself looks good. One bug I noticed was that when I changed a date to be out of bounds and tried to change it back, the warning and the red highlight stays even if its consistent. I'm not sure if this issue relates to your commits or to the new merges because I was receiving a similar issue when I tested on the main.

In the example below I changed the grading due date to be in the year 2226, then I changed the inquiry dates to the year 9999, then I switched the grading due date back to 2026. Strange Image OS: Windows Browser: Chrome

This might be happening because changes have failed to save. The message does not go away until changes have saved and the dates are not invalid.

Made sure that gradeables can be viewed by the proper access levels when grading due date is in the past and all other dates are in the future.

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

Yeah, Looks good! The issue I was having isn't occuring anymore. Tested various dates in various orders and it is working as intended.

OS: Windows
Browser: Chrome

@Christian2147
Christian2147 requested a review from JManion32 April 21, 2026 21:08
@automateprojectmangement automateprojectmangement Bot moved this from Awaiting Maintainer Review to In Review in Submitty Development Apr 21, 2026
@Christian2147
Christian2147 requested a review from bmcutler April 29, 2026 14:31
@bmcutler
bmcutler merged commit f7121c2 into main Apr 30, 2026
28 checks passed
@bmcutler
bmcutler deleted the grading-start-date-constraints branch April 30, 2026 15:10
@github-project-automation github-project-automation Bot moved this from In Review to Done in Submitty Development Apr 30, 2026
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