[Bugfix:TAGrading] Fix override stats counting#12651
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12651 +/- ##
============================================
- Coverage 21.67% 21.65% -0.02%
+ Complexity 9802 9801 -1
============================================
Files 268 268
Lines 36724 36755 +31
Branches 490 490
============================================
Hits 7960 7960
- Misses 28278 28309 +31
Partials 486 486
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Fixed the lint errors, the Cypress workflow failure is directly related to this issue #12683, once it gets resolved everything should pass. |
|
Please resolve merge conflicts. |
3bf8c18 to
5fc9d6e
Compare
|
Will do the needful soon |
There was a problem hiding this comment.
Pull request overview
This PR fixes TA grading statistics and completion/progress behavior when grade overrides exist (especially for students without submissions), and makes override visibility explicit on the grading status page.
Changes:
- Adjust TA completion/statistics queries and progress calculations so no-submission overrides don’t inflate completion beyond 100% and don’t incorrectly drive “incomplete/red” UI states.
- Add override-count visibility (split with/without submission) to the non-peer grading status page, including an indicator when overrides are excluded by filter.
- Update Cypress coverage for TA grading percent bounds under filter toggles, and refactor/stabilize leaderboard Cypress flows.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| site/phpstan-baseline.neon | Removes now-resolved baseline entries after strict-comparison cleanup. |
| site/cypress/e2e/Cypress-TAGrading/grading_stats.spec.js | Adds a Cypress assertion guarding TA % ≤ 100 across filter toggles. |
| site/cypress/e2e/Cypress-Gradeable/leaderboard_gradeable.spec.js | Refactors leaderboard test helpers and adds more robust waits/timeouts. |
| site/app/views/grading/ElectronicGraderView.php | Adds override-count params to status rendering; tightens comparisons. |
| site/app/views/NavigationView.php | Passes grade-override filter through to TA grading progress for main page UI. |
| site/app/templates/grading/electronic/ta_status/StatusData.twig | Displays override counts (with/without submissions) and filter-exclusion note. |
| site/app/models/gradeable/Gradeable.php | Extends TA grading progress to respect override inclusion; strict comparison cleanup. |
| site/app/libraries/database/DatabaseQueries.php | Updates stats SQL (UNION ALL) and adds override split-count query. |
| site/app/controllers/grading/ElectronicGraderController.php | Wires new override-count stats to the status page and threads override filter through graded-count queries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Done, also verified the functionality remains unchanged. |
|
@dagemcn Resolved the merge conflicts and fix failing workflows, the remaining failures are due to connection timeout, so the PR should be good to go for review. |
dagemcn
left a comment
There was a problem hiding this comment.
Code looks good and functionality works as intended. Tested on Opera and I was not able to find any issues.


Why is this Change Important & Necessary?
Closes #11247.
Grade overrides are used in two valid ways:
Previously, grading statistics could become confusing:
This change makes completion and statistics behavior consistent and explicit.
What is the New Behavior?
Number of grade overrides: total (with submissions, without submissions)UNION ALLfor override rows, so multiple no-submission overrides with same marks are all counted.What steps should a reviewer take to reproduce or test the bug or new feature?
Environment:
grades_released_homework(or equivalent non-team electronic gradeable).Baseline:
Link in case of Grades Released Homework grade card-
http://localhost:1511/courses/s26/sample/gradeable/grades_released_homework/grading/status
Before moving forward, note that in top right corner there is a button edit filers, using this only you can modify what all various types of students will be included in statistics.
2. Note:
Create override data:
To save you time, you can add override for these students and check-
Verify with Include Grade Overrides ON:
Verify with Include Grade Overrides OFF:
Main page verification:
Automated Testing & Documentation
Automated testing:
Documentation:
Other information