Skip to content

fix(ClassroomMonitor): Update grade by step completion as student statuses arrive - #2362

Open
Isaries wants to merge 1 commit into
WISE-Community:developfrom
Isaries:fix/live-grade-by-step
Open

Isaries wants to merge 1 commit into
WISE-Community:developfrom
Isaries:fix/live-grade-by-step

Conversation

@Isaries

@Isaries Isaries commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

In Grade by Step, each team's row, the step's completion percentage and each component's response count were computed once when the step was opened. Student status messages reached the step list on the left, but nothing on the grade by step page listened to them, so a team that submitted after the teacher opened the step stayed Partially Completed until the page was reloaded. Teachers following a class live reloaded the page repeatedly to see progress.

Rows now refresh when the team's student status or work arrives. A refreshed row gets a new object, because the row component only recalculates when its input reference changes; rows keep their position so the list does not jump while the teacher reads it. Teams that appear when the config is reloaded are added. The completion percentage and the component response counts are recalculated on each student status.

Completion now prefers what the student's own client reported in its status over recomputing it from the teacher's locally cached work, which can lag behind (for example after a reconnect) and only sees the component in question. Statuses posted by older clients without componentStatuses fall back to the node's isCompleted. Teams a component is hidden from are left out of its response count. The base class change also applies to the milestone responses list.

Testing: ten new tests across NodeClassResponsesComponent, NodeGradingComponent and ComponentCompletionComponent; eight fail on develop. Full suite: 2509 pass, with one failure that also fails on develop (millisecondsToDateTime(), time zone dependent).

…tuses arrive

The grade by step rows, the step completion percentage and the component
response counts were computed once when the step opened, so teams that
submitted later stayed Partially Completed until the page was reloaded.

- Refresh a team's row when its student status or work arrives, replacing
  the row object so the row recalculates. Rows keep their position; the
  list is not re-sorted under the teacher.
- Add teams that appear when the config is reloaded
- Recalculate the step completion percentage and component response
  counts on each student status
- Prefer the completion reported in the student status over recomputing
  it from locally cached work, which only sees the component in question.
  This also applies to the milestone responses list, which shares the base
  class.
- Exclude teams a component is hidden from in its response count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant