[Feature:InstructorUI] Due Date Constraints#12741
Conversation
Added warning message when due date is after manual grading start date.
If manual grading is enabled and the assignment has a due date, then display the warning if manual grading opens before the due date.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@Christian2147 This is failing 2 Gradeable tests. Please resolve before we review. |
Rkoester47
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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
Fixed an issue where student couldnt view the gradeable if all dates but the grading start date was in the future.
Rkoester47
left a comment
There was a problem hiding this comment.
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.
### 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.
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:

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:

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.