Repository navigation
Conversation
…m that only replied DiscussionShowWorkComponent builds a team's threads with getClassResponses, which resets every post's replies to an empty array, and then getLevel1Responses, which keeps a thread only if the team wrote the top-level post or one of its replies. The replies are attached to their threads by getResponsesMap, which the component called before WISE-Community#2232. That refactor removed the call together with the unused responsesMap field it was assigned to, so replies stayed empty. As a result, in Class Responses every thread shows no comments, and a team whose only posts are replies to other teams shows an empty panel. Call getResponsesMap again before selecting the top-level threads.
Isaries
force-pushed
the
fix/discussion-grading-replies
branch
from
November 27, 2026 13:46
4ac8110 to
c3d4017
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the teacher's grading view (Class Responses), expanding a team's Discussion work shows its threads without any of their replies. A team whose only contributions are replies to other teams' posts is worse off: its panel is empty, as if it had not taken part in the discussion at all.
The cause is in
DiscussionShowWorkComponent.getClassResponsesresets every post'srepliesto an empty array, andgetLevel1Responseskeeps a thread only when the team wrote either the top-level post or one of its replies in this component. Replies are attached to their threads bygetResponsesMap. The component called it until #2232, which removed the call together with theresponsesMapfield it was assigned to. The field was unused, but the call was needed for its side effect. Since then every thread has had an emptyrepliesarray, so no comments are shown and threads in which the team only replied are filtered out.This restores the behavior from before #2232 and adds nothing beyond it. One related gap predates both: the grading view renders
ClassResponse, which has no hide or show controls, so a reply a teacher hid elsewhere appears here without any mark. It is left for a separate change.Changes
DiscussionShowWorkComponentcallsgetResponsesMapagain before selecting the top-level threads.discussion-show-work.component.spec.tscovering a team that only replied, the replies under a team's own post, and a thread the team took no part in.Test
Two of the three new tests fail on current
develop:With the change, all three pass, as do the other Discussion specs (62 in total). Also checked by hand on a class discussion: in Class Responses, every team now shows the threads it posted or replied in, with their comments.