Skip to content

[Feature:TAGrading] Show override score#12602

Merged
bmcutler merged 7 commits into
Submitty:mainfrom
GarvitKhandelwal31:override-visibility
Mar 27, 2026
Merged

[Feature:TAGrading] Show override score#12602
bmcutler merged 7 commits into
Submitty:mainfrom
GarvitKhandelwal31:override-visibility

Conversation

@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor

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?

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

Before proceeding further, uncheck Only Assigned Sections button.

  1. You will come to this page.
image Verify in case of Ben, in grading there exists a yellow button, which states overridden and also shows his marks.
  1. For the final verification, click on the overridden button only in the Ben's row, you will come to this page-
image 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.

Copilot AI review requested due to automatic review settings March 18, 2026 16:51

Copilot AI 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.

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.

Comment thread site/app/templates/grading/electronic/Details.twig
Comment thread site/app/templates/grading/electronic/Details.twig
Comment thread site/app/views/grading/ElectronicGraderView.php Outdated
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@dagemcn
dagemcn self-requested a review March 20, 2026 14:30
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Mar 20, 2026
@codecov

codecov Bot commented Mar 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.65%. Comparing base (3efe6e6) to head (a08a0d3).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             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              
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.67% <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.

dagemcn

This comment was marked as resolved.

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Mar 20, 2026

@dagemcn dagemcn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Everything looks good! I would look at the one failing test you have, you may need to update the cypress test further or change what you wrote.

@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Work in Progress in Submitty Development Mar 20, 2026
@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor Author

@dagemcn I investigatedthe the one failing check-
It appears to me that is it is a test expectation mismatch, not a functional regression in override behavior.

The failure occurred on grade_override.js-
The element found by Cypress already had class btn-warning, which means override state was successfully applied.
Therefore, the failing condition is the exact text content check, not whether override UI rendering happened.

Most likely root cause in my opinion-

  1. It relies on a fixed row index using eq(12), which may point to a different student row in CI than locally.
  2. It hardcodes the denominator as 20, but rendered total possible may differ in CI data/config for that row.

@dagemcn

dagemcn commented Mar 24, 2026

Copy link
Copy Markdown
Member

Everything looks good! I would look at the one failing test you have, you may need to update the cypress test further or change what you wrote.

@dagemcn I investigatedthe the one failing check- It appears to me that is it is a test expectation mismatch, not a functional regression in override behavior.

The failure occurred on grade_override.js- The element found by Cypress already had class btn-warning, which means override state was successfully applied. Therefore, the failing condition is the exact text content check, not whether override UI rendering happened.

Most likely root cause in my opinion-

  1. It relies on a fixed row index using eq(12), which may point to a different student row in CI than locally.
  2. It hardcodes the denominator as 20, but rendered total possible may differ in CI data/config for that row.

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.

@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor Author

Made the changes.

@dagemcn dagemcn self-assigned this Mar 24, 2026

@dagemcn dagemcn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!

@github-project-automation github-project-automation Bot moved this from Work in Progress to Awaiting Maintainer Review in Submitty Development Mar 24, 2026
@bmcutler
bmcutler merged commit f46234e into Submitty:main Mar 27, 2026
47 of 48 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development Mar 27, 2026
GarvitKhandelwal31 added a commit to GarvitKhandelwal31/Submitty that referenced this pull request Mar 29, 2026
### 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]>
GarvitKhandelwal31 added a commit to GarvitKhandelwal31/Submitty that referenced this pull request Apr 14, 2026
### 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]>
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.

Add override score to student view of overridden grade

4 participants