[Feature:TAGrading] Show override score#12602
Conversation
There was a problem hiding this comment.
Pull request overview
Adds richer UI visibility for grade overrides across student and TA grading workflows so users can see the overridden numeric score (and reason where applicable), aligning with the grade override feature expectations.
Changes:
- Student submission page override banner now displays the overridden score.
- TA grading details index shows overridden grades with a yellow “Overridden (x / total)” button and updated total column display.
- TA grading page banner includes overridden score and (optionally) the override reason; Cypress assertions updated accordingly.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| site/cypress/e2e/Cypress-Feature/grade_override.spec.js | Updates feature test assertions for new override button text/style and TA banner text. |
| site/app/views/submission/HomeworkView.php | Computes/passes overridden score into the student submit box Twig context. |
| site/app/templates/submission/homework/SubmitBox.twig | Displays overridden score in the student override banner. |
| site/app/controllers/grading/ElectronicGraderController.php | Fetches override marks/comment and passes them into the TA details page rendering context. |
| site/app/views/grading/ElectronicGraderView.php | Extends detailsPage signature/doc to accept override data and forwards it to the template. |
| site/app/templates/grading/electronic/Details.twig | Renders overridden grading buttons as warning/yellow with score text and updates total column to show overridden marks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12602 +/- ##
============================================
- Coverage 21.65% 21.65% -0.01%
Complexity 9650 9650
============================================
Files 268 268
Lines 36231 36236 +5
Branches 487 487
============================================
Hits 7846 7846
- Misses 27902 27907 +5
Partials 483 483
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@dagemcn I investigatedthe the one failing check- The failure occurred on grade_override.js- Most likely root cause in my opinion-
|
This is because the assignment they are using for the Cypress tests is grading out of 12. Change the denominators for both to 12 and I believe that should fix it. |
|
Made the changes. |
### Why is this Change Important & Necessary? Closes Submitty#12405. Grade overrides were visible to students/TAs, but the overridden numeric value and override reason were not shown in key grading workflows. This made it difficult to understand final grading outcomes after an override. ### What is the New Behavior? 1. Student submission page yellow override banner now includes the overridden score. 2. TA grading details index now shows overridden rows with a yellow Overridden button. 3. TA grading details index now includes overridden score in the grading button text and total column. 4. TA grading page banner now shows overridden score and override reason (if provided). Deatiled images of each of these is provided below. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1) Login as an instructor. 2) Go to this link, http://localhost:1511/courses/s26/sample/grade_override 3) Then select gradeable and add a single student entry. <img width="1917" height="1010" alt="image" src="https://github.com/user-attachments/assets/66be2190-2962-44be-bce8-b0f8804471aa" /> Here kindly also note the grade_id -- in this case it is grades_released_homework_autohiddenEC 4) Then logout from the instructor and login back as the exact same student. The user_id and password will be same as that of the user_id of student. In this case it would be bitdiddle. 5) Go to this link http://localhost:1511/courses/s26/sample/gradeable/grade_id In this case link will be http://localhost:1511/courses/s26/sample/gradeable/grades_released_homework_autohiddenEC Now verify that in the yellow bar overridden marks are also visible. <img width="1913" height="944" alt="image" src="https://github.com/user-attachments/assets/faf387ee-559e-4e3f-888b-5159b880fbe6" /> 6) Now logout as Ben, and login back as instructor. 7) Go to this link http://localhost:1511/courses/s26/sample/gradeable/gradeable_id/grading/details In this case link will be- http://localhost:1511/courses/s26/sample/gradeable/grades_released_homework_autohiddenEC/grading/details You will come to this page- <img width="1904" height="935" alt="image" src="https://github.com/user-attachments/assets/633b4cad-e7d9-40a3-a933-05fb7fb5fe1e" /> Before proceeding further, uncheck Only Assigned Sections button. 8) You will come to this page. <img width="1900" height="959" alt="image" src="https://github.com/user-attachments/assets/9307bb3e-88cf-4373-9dc3-f14f3223076b" /> Verify in case of Ben, in grading there exists a yellow button, which states overridden and also shows his marks. 9) For the final verification, click on the overridden button only in the Ben's row, you will come to this page- <img width="1896" height="963" alt="image" src="https://github.com/user-attachments/assets/3c02ca5f-142d-4005-8f49-492b7ed9c3d2" /> Verify here in the yellow bar, you can see his overridden marks and reason. We have successfully verified everything. ### Automated Testing & Documentation - Updated Cypress test coverage for override UI behavior in grade override feature test. - Manual verification completed in local Vagrant UI for student banner, TA index, and TA grading banner. - submitty.org documentation update is still needed for new screenshots/text on the grade override page. ### Other information - Breaking change: No. - Migrations required: No. - Security concerns: None identified. --------- Co-authored-by: Copilot Autofix powered by AI <[email protected]> Co-authored-by: dagemcn <[email protected]>
### Why is this Change Important & Necessary? Closes Submitty#12405. Grade overrides were visible to students/TAs, but the overridden numeric value and override reason were not shown in key grading workflows. This made it difficult to understand final grading outcomes after an override. ### What is the New Behavior? 1. Student submission page yellow override banner now includes the overridden score. 2. TA grading details index now shows overridden rows with a yellow Overridden button. 3. TA grading details index now includes overridden score in the grading button text and total column. 4. TA grading page banner now shows overridden score and override reason (if provided). Deatiled images of each of these is provided below. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1) Login as an instructor. 2) Go to this link, http://localhost:1511/courses/s26/sample/grade_override 3) Then select gradeable and add a single student entry. <img width="1917" height="1010" alt="image" src="https://github.com/user-attachments/assets/66be2190-2962-44be-bce8-b0f8804471aa" /> Here kindly also note the grade_id -- in this case it is grades_released_homework_autohiddenEC 4) Then logout from the instructor and login back as the exact same student. The user_id and password will be same as that of the user_id of student. In this case it would be bitdiddle. 5) Go to this link http://localhost:1511/courses/s26/sample/gradeable/grade_id In this case link will be http://localhost:1511/courses/s26/sample/gradeable/grades_released_homework_autohiddenEC Now verify that in the yellow bar overridden marks are also visible. <img width="1913" height="944" alt="image" src="https://github.com/user-attachments/assets/faf387ee-559e-4e3f-888b-5159b880fbe6" /> 6) Now logout as Ben, and login back as instructor. 7) Go to this link http://localhost:1511/courses/s26/sample/gradeable/gradeable_id/grading/details In this case link will be- http://localhost:1511/courses/s26/sample/gradeable/grades_released_homework_autohiddenEC/grading/details You will come to this page- <img width="1904" height="935" alt="image" src="https://github.com/user-attachments/assets/633b4cad-e7d9-40a3-a933-05fb7fb5fe1e" /> Before proceeding further, uncheck Only Assigned Sections button. 8) You will come to this page. <img width="1900" height="959" alt="image" src="https://github.com/user-attachments/assets/9307bb3e-88cf-4373-9dc3-f14f3223076b" /> Verify in case of Ben, in grading there exists a yellow button, which states overridden and also shows his marks. 9) For the final verification, click on the overridden button only in the Ben's row, you will come to this page- <img width="1896" height="963" alt="image" src="https://github.com/user-attachments/assets/3c02ca5f-142d-4005-8f49-492b7ed9c3d2" /> Verify here in the yellow bar, you can see his overridden marks and reason. We have successfully verified everything. ### Automated Testing & Documentation - Updated Cypress test coverage for override UI behavior in grade override feature test. - Manual verification completed in local Vagrant UI for student banner, TA index, and TA grading banner. - submitty.org documentation update is still needed for new screenshots/text on the grade override page. ### Other information - Breaking change: No. - Migrations required: No. - Security concerns: None identified. --------- Co-authored-by: Copilot Autofix powered by AI <[email protected]> Co-authored-by: dagemcn <[email protected]>
Why is this Change Important & Necessary?
Closes #12405.
Grade overrides were visible to students/TAs, but the overridden numeric value and override reason were not shown in key grading workflows. This made it difficult to understand final grading outcomes after an override.
What is the New Behavior?
Deatiled images of each of these is provided below.
What steps should a reviewer take to reproduce or test the bug or new feature?
In this case link will be http://localhost:1511/courses/s26/sample/gradeable/grades_released_homework_autohiddenEC
Now verify that in the yellow bar overridden marks are also visible.

6) Now logout as Ben, and login back as instructor.
7) Go to this link http://localhost:1511/courses/s26/sample/gradeable/gradeable_id/grading/details
In this case link will be-
http://localhost:1511/courses/s26/sample/gradeable/grades_released_homework_autohiddenEC/grading/details
You will come to this page-

Before proceeding further, uncheck Only Assigned Sections button.
We have successfully verified everything.
Automated Testing & Documentation
Other information