Skip to content

[Bugfix:Submission] Staff highlight#12589

Merged
bmcutler merged 5 commits into
Submitty:mainfrom
GarvitKhandelwal31:fix/leaderboard-staff-highlight
Mar 24, 2026
Merged

[Bugfix:Submission] Staff highlight#12589
bmcutler merged 5 commits into
Submitty:mainfrom
GarvitKhandelwal31:fix/leaderboard-staff-highlight

Conversation

@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor

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?

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

Automated Testing & Documentation

Not covered by automated tests. No documentation changes needed.

Other information

No migrations. Not a breaking change. No known security impact.

Copilot AI review requested due to automatic review settings March 15, 2026 14:20
@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Mar 15, 2026
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Mar 15, 2026
@GarvitKhandelwal31
GarvitKhandelwal31 force-pushed the fix/leaderboard-staff-highlight branch from bcf2499 to 101196d Compare March 15, 2026 14:22

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

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 explicit Doctrine\ORM\Configuration + Symfony Cache adapters.
  • Update PHP dependencies (notably doctrine/dbal and add psr/cache) and adjust composer.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.

@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor Author

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 explicit Doctrine\ORM\Configuration + Symfony Cache adapters.
  • Update PHP dependencies (notably doctrine/dbal and add psr/cache) and adjust composer.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

codecov Bot commented Mar 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.66%. Comparing base (b70fe3d) to head (acae68d).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

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

@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor Author

PHPStan failure in check 7c385aa is unrelated to this PR. It reports:
app/views/submission/TeamView.php:29 — “Only booleans are allowed in a ternary operator condition, app\models\Team|null given.”
That line uses $team == null ? null : $team->getTeamName() and is outside this change. I can open a separate PR to adjust it to $team !== null ? $team->getTeamName() : null if desired.

@GarvitKhandelwal31

GarvitKhandelwal31 commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

Hi @Christian2147, thanks for running the workflows. Any other changes required from my side?

@Christian2147 Christian2147 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.

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.

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Mar 24, 2026
@bmcutler
bmcutler merged commit 3efe6e6 into Submitty:main Mar 24, 2026
25 checks passed
GarvitKhandelwal31 added a commit to GarvitKhandelwal31/Submitty that referenced this pull request Mar 25, 2026
### 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.
GarvitKhandelwal31 added a commit to GarvitKhandelwal31/Submitty that referenced this pull request Mar 29, 2026
### 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.
GarvitKhandelwal31 added a commit to GarvitKhandelwal31/Submitty that referenced this pull request Apr 14, 2026
### 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.
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.

Certain Course Staff not Highlighted on Leaderboard Gradeables

4 participants