[Bugfix:TAGrading] TA Grading Unexpanded View Fix#12131
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
RyanStyron
left a comment
There was a problem hiding this comment.
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.
RyanStyron
left a comment
There was a problem hiding this comment.
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. |
site/public/js/gradeable.js
Outdated
| */ | ||
| const DECIMAL_PRECISION = 3; | ||
|
|
||
| const TEMPLATE_VERSION = '20251024'; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
@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.
|
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. |
|
merging this now. @Rkoester47 will open an issue to add a test in a future PR. |
### 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.
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:

Now:

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.