[Bugfix:TAGrading] Restrict submission view before grading#12813
Conversation
…ons before grading opens (Submitty#11372)
|
We will need to have automated tests of this feature before it can be merged |
Rkoester47
left a comment
There was a problem hiding this comment.
I tested the functionality for the changes described on this PR, and can confirm that they are working properly. As a limited access grader, I cannot view a submission for a gradeable with a grading start date in the future.
Please make some cypress tests for this PR that test the functionality as well and I will approve. The tests should login as an instructor to submit for students to a future grading start date, then login as 'grader' and verify that the grader is redirected as desired.
|
Hi @Rkoester47, thank you for noticing my contribution. I have added the Cypress tests as requested. The test logs in as instructor, submits on behalf of student with user id "boehmd", then logs in as the limited access grader and verifies Please let me know if any changes are needed. |
|
Hello @Rkoester47, could you please review the following changes and the cypress test associated with the change as per requested. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12813 +/- ##
============================================
- Coverage 21.67% 21.67% -0.01%
- Complexity 9802 9804 +2
============================================
Files 268 268
Lines 36723 36727 +4
Branches 489 489
============================================
Hits 7960 7960
- Misses 28278 28282 +4
Partials 485 485
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
GarvitKhandelwal31
left a comment
There was a problem hiding this comment.
As for the functionality everything looks good to me. Solution is well implemented.
Just that in the error message you can see the word grading appears broken and half of that comes in next line. Can we improve on this.
Also after your changes make sure you add the screenshots in the description. I will approve the PR after that
|
@GarvitKhandelwal31. Tweaked Css to address the issue. Do review the changes. I have also attached the screenshot for the UI change. |
GarvitKhandelwal31
left a comment
There was a problem hiding this comment.
The changes and the UI warning banner looks good to me. The code looks clean as well.
Why is this Change Important & Necessary?
Fixes #11372
Limited access graders were able to view student submissions before the grade start date. They should only be able to view submissions once grading officially opens.
What is the New Behavior?
A check is added in ElectronicGraderController.php that blocks limited access graders from viewing submissions if the current date is before the grade_start_date. They are redirected to the course home page with an error message.
What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
No automated tests added. A new issue can be opened to track adding tests for this access control check.
Other information
No breaking changes. No migrations required.