Skip to content

[Bugfix:TAGrading] TA Grading Unexpanded View Fix#12131

Merged
bmcutler merged 11 commits intomainfrom
fix-selected-marks-ta-view
Nov 19, 2025
Merged

[Bugfix:TAGrading] TA Grading Unexpanded View Fix#12131
bmcutler merged 11 commits intomainfrom
fix-selected-marks-ta-view

Conversation

@Rkoester47
Copy link
Contributor

Why is this Change Important & Necessary?

Fixes #12083
Currently the TA grading view does not match the student view in terms of displaying unselected marks. The "display to all marks" and given marks should be displayed on collapse, but instead unselected, non-display-to-all marks are displayed upon clicking save.

What is the New Behavior?

Now, when a TA grades a problem in an assignment and hits save, the problem should collapse to the unexpanded view. It will only display marks given to the student by the TA, as well as marks highlighted as display to all students (regardless of whether the mark is given).

Previous:
495359821-11cbe156-b7d0-44a7-9ead-6bd6b319c09d

Now:
image

What steps should a reviewer take to reproduce or test the bug or new feature?

1.Sign in as TA
2. Go to Sample > Open VCS Homework Grading (or presumably any open grading assignment)
3. Begin grading a problem. Make sure that you first click "Edit gradeable" on the top right of the rubric, and highlight a few marks from a few problems as "show mark to all students"
4. Grade the problems with a mix of checking off those blue marks, checking off no marks, checking off non-blue marks etc
5. Hit save on each problem and see if only the blue "show to all" marks remain, along with any marks you (TA) selected.

Automated Testing & Documentation

Other information

This is not a breaking change.

@github-project-automation github-project-automation bot moved this to Seeking Reviewer in Submitty Development Oct 7, 2025
@Rkoester47 Rkoester47 changed the title Display to all and given marks display on collapse [BugFix:TAGrading] TA Grading Unexpanded View Fix Oct 7, 2025
@codecov
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.71%. Comparing base (f1e3e70) to head (d3f97b4).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12131   +/-   ##
=========================================
  Coverage     21.71%   21.71%           
  Complexity     9612     9612           
=========================================
  Files           268      268           
  Lines         36073    36073           
  Branches        475      475           
=========================================
  Hits           7832     7832           
  Misses        27770    27770           
  Partials        471      471           
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.07% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.71% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 90.72% <ø> (ø)

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.

@Rkoester47 Rkoester47 changed the title [BugFix:TAGrading] TA Grading Unexpanded View Fix [Bugfix:TAGrading] TA Grading Unexpanded View Fix Oct 7, 2025
Copy link
Contributor

@RyanStyron RyanStyron left a comment

Choose a reason for hiding this comment

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

The issue persists upon editing the rubric for a Gradeable for the first time. Additionally, it appears as though disabling the visibility for the option where a student loses 0 points is not always active.

@github-project-automation github-project-automation bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Oct 14, 2025
Copy link
Contributor

@RyanStyron RyanStyron left a comment

Choose a reason for hiding this comment

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

The cache busting appears to have corrected the issue. Is it intended that the unexpanded view does not show the show-all rubric points when a section is not graded? Currently, none of the rubric messages show unless one has been selected.

@github-project-automation github-project-automation bot moved this from Work in Progress to Awaiting Maintainer Review in Submitty Development Oct 28, 2025
@RyanStyron
Copy link
Contributor

The cache busting appears to have corrected the issue. Is it intended that the unexpanded view does not show the show-all rubric points when a section is not graded? Currently, none of the rubric messages show unless one has been selected.

Appears as though this is as desired, so I have approved the PR.

@RyanStyron RyanStyron moved this from Awaiting Maintainer Review to Ready to Merge in Submitty Development Nov 11, 2025
@automateprojectmangement automateprojectmangement bot moved this from Ready to Merge to In Review in Submitty Development Nov 14, 2025
*/
const DECIMAL_PRECISION = 3;

const TEMPLATE_VERSION = '20251024';
Copy link
Member

Choose a reason for hiding this comment

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

Hard-coding an ID like this is almost certainly not the right way to solve this problem. Can you please clarify why you believe this is the correct approach? If your goal is simply to solve the problem of needing to force refresh after a code change involving Twig.js, that is a separate longstanding issue which should be addressed via a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for giving me feedback on this. I agree that hard-coding to solve the cache clearing problem was not the right way to go, and I have reverted those changes. As far as I can tell my original changes on this PR do seem to have resolved the initial issue of TA un-expanded grading view not matching the student view. It seems it just sometimes requires the user testing these changes to clear their cookies for the fix to take effect.

With that in mind, do you recommend I leave this PR as it is now and work on the Twig files needing a refresh issue in another PR? Or do you believe this PR still needs more work to make sure my original fix works on every device regardless of if the user hard-refreshes or clears their cookies?

Copy link
Member

Choose a reason for hiding this comment

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

@Rkoester47 Any attempts to address the Twig caching issue should be done in a separate PR. This PR should be good to go once you add a Cypress test.

@github-project-automation github-project-automation bot moved this from In Review to Work in Progress in Submitty Development Nov 16, 2025
@williamjallen
Copy link
Member

Please also add a Cypress test which fails on main and passes on this branch to ensure this error does not occur again in the future.

@Rkoester47 Rkoester47 moved this from Work in Progress to Ready to Merge in Submitty Development Nov 18, 2025
@bmcutler
Copy link
Member

merging this now. @Rkoester47 will open an issue to add a test in a future PR.

@bmcutler bmcutler merged commit 6acc0b9 into main Nov 19, 2025
23 of 25 checks passed
@bmcutler bmcutler deleted the fix-selected-marks-ta-view branch November 19, 2025 08:05
@github-project-automation github-project-automation bot moved this from Ready to Merge to Done in Submitty Development Nov 19, 2025
bmcutler pushed a commit that referenced this pull request Dec 15, 2025
### Why is this Change Important & Necessary?
Fixes #12220

Previously, there was an issue #12083, where the collapsed view of a
graded component for a TA did not match the student's view. This was
resolved by PR #12131 .

### What is the New Behavior?
To ensure this problem remains fully resolved, this Cypress test logs in
as a TA, assigns a mark that is not marked "show to all students", and
then collapses the component. The test verifies that only the assigned
mark, and the show-to-all mark, are the only two visible in this graded
component.

### What steps should a reviewer take to reproduce or test the bug or
new feature?
Review the code and make sure test is passing.

### Automated Testing & Documentation

### Other information
This is not a breaking change.
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.

Display of selected marks should preview student view

5 participants