[Bugfix:Submission] Staff highlight#12589
Conversation
bcf2499 to
101196d
Compare
There was a problem hiding this comment.
Pull request overview
This PR modernizes Doctrine caching/config usage to avoid deprecated doctrine/cache, updates dependencies accordingly, and includes a handful of related fixes/improvements across the web UI, PHPStan configuration, and setup tooling.
Changes:
- Replace
ORMSetup::createAttributeMetadataConfiguration(...)usage with explicitDoctrine\ORM\Configuration+ Symfony Cache adapters. - Update PHP dependencies (notably
doctrine/dbaland addpsr/cache) and adjustcomposer.lock. - Add robustness tweaks in the submission timer JS and adjust leaderboard grader highlighting logic; add a new system install script.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| site/tests/phpstan/DoctrineExtensionTester.php | Switch Doctrine config setup to explicit ORMConfiguration + AttributeDriver + ArrayAdapter for cache |
| site/public/js/submission-page.js | Add buildCourseUrlSafe() fallback to avoid reliance on server.js load order |
| site/phpstan-baseline.neon | Add baseline suppression for a new/changed PHPStan finding |
| site/composer.lock | Remove doctrine/cache and bump doctrine/dbal lock data |
| site/composer.json | Bump doctrine/dbal and add psr/cache requirement |
| site/app/templates/submission/homework/leaderboard/LeaderboardTable.twig | Treat limited-access graders as graders in leaderboard styling/ranking logic |
| site/app/models/RainbowCustomizationJSON.php | Remove inline PHPStan ignore and keep object iteration logic for JSON save |
| site/app/libraries/Core.php | Update Doctrine EntityManager configuration to use Symfony cache + explicit config |
| .setup/install_system.sh | Add a new all-in-one installation/provisioning script |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can ignore this, I mistakenly pushed from a different branch. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12589 +/- ##
=========================================
Coverage 21.66% 21.66%
Complexity 9639 9639
=========================================
Files 268 268
Lines 36226 36226
Branches 487 487
=========================================
Hits 7847 7847
Misses 27896 27896
Partials 483 483
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
PHPStan failure in check 7c385aa is unrelated to this PR. It reports: |
|
Hi @Christian2147, thanks for running the workflows. Any other changes required from my side? |
Christian2147
left a comment
There was a problem hiding this comment.
I tested it in both light mode and dark mode and different users, and this seems to be working great from what I can tell.
### Why is this Change Important & Necessary? Fixes Submitty#12583 ### What is the New Behavior? All course staff entries (including limited-access graders) are highlighted in blue on the leaderboard, and remain unranked. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Log in as instructor. 2. Go to http://localhost:1511/courses/s26/sample/gradeable/leaderboard 3. Submit once as `grader` and once as `ta` using “Make Submission for a Student”. 4. Wait for autograding to complete. 5. Open http://localhost:1511/courses/s26/sample/gradeable/leaderboard/leaderboard 6. Confirm both `grader` and `ta` rows are blue and unranked. <img width="1897" height="955" alt="image" src="https://github.com/user-attachments/assets/b7dc0277-b88c-4ea4-a88c-86b50f6897b3" /> ### Automated Testing & Documentation Not covered by automated tests. No documentation changes needed. ### Other information No migrations. Not a breaking change. No known security impact.
### Why is this Change Important & Necessary? Fixes Submitty#12583 ### What is the New Behavior? All course staff entries (including limited-access graders) are highlighted in blue on the leaderboard, and remain unranked. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Log in as instructor. 2. Go to http://localhost:1511/courses/s26/sample/gradeable/leaderboard 3. Submit once as `grader` and once as `ta` using “Make Submission for a Student”. 4. Wait for autograding to complete. 5. Open http://localhost:1511/courses/s26/sample/gradeable/leaderboard/leaderboard 6. Confirm both `grader` and `ta` rows are blue and unranked. <img width="1897" height="955" alt="image" src="https://github.com/user-attachments/assets/b7dc0277-b88c-4ea4-a88c-86b50f6897b3" /> ### Automated Testing & Documentation Not covered by automated tests. No documentation changes needed. ### Other information No migrations. Not a breaking change. No known security impact.
### Why is this Change Important & Necessary? Fixes Submitty#12583 ### What is the New Behavior? All course staff entries (including limited-access graders) are highlighted in blue on the leaderboard, and remain unranked. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Log in as instructor. 2. Go to http://localhost:1511/courses/s26/sample/gradeable/leaderboard 3. Submit once as `grader` and once as `ta` using “Make Submission for a Student”. 4. Wait for autograding to complete. 5. Open http://localhost:1511/courses/s26/sample/gradeable/leaderboard/leaderboard 6. Confirm both `grader` and `ta` rows are blue and unranked. <img width="1897" height="955" alt="image" src="https://github.com/user-attachments/assets/b7dc0277-b88c-4ea4-a88c-86b50f6897b3" /> ### Automated Testing & Documentation Not covered by automated tests. No documentation changes needed. ### Other information No migrations. Not a breaking change. No known security impact.
Why is this Change Important & Necessary?
Fixes #12583
What is the New Behavior?
All course staff entries (including limited-access graders) are highlighted in blue on the leaderboard, and remain unranked.
What steps should a reviewer take to reproduce or test the bug or new feature?
graderand once astausing “Make Submission for a Student”.graderandtarows are blue and unranked.Automated Testing & Documentation
Not covered by automated tests. No documentation changes needed.
Other information
No migrations. Not a breaking change. No known security impact.