Skip to content

Conversation

@nucleogenesis
Copy link
Member

Summary

Fixing a bug described by @pcenov during his testing on #13865

In the ClassEditPage, when a user would remove a coach, the state for the currentClass was not being updated. Manually updating it here fixes the reported issue.

This only affected the coaches because, despite there being classLearners and classCoaches properties on the module's state, the ClassCopyModal fetches the learners for the target class, but uses the currentClass.coaches value passed into it's classToCopy prop.

This isn't really the ideal solution, but it'll avoid introducing a bug to our new-to-this-page class copy functionality.

Reviewer guidance

Go to a class's details page and, in general:

  • Copy the class by clicking the "Options" dropdown - be sure that the same number of learners & coaches (and the same actual users) are in the new copy
  • Open the "Copy class" modal, cancel it, then remove coaches and/or learners, go to copy again and verify the numbers shown reflect the users who remain in your class. Copy them and verify that the users you'd removed aren't included in the copied class.

@github-actions github-actions bot added APP: Facility Re: Facility App (user/class management, facility settings, csv import/export, etc.) DEV: frontend labels Nov 6, 2025
@nucleogenesis nucleogenesis added P0 - critical Priority: Release blocker or regression and removed APP: Facility Re: Facility App (user/class management, facility settings, csv import/export, etc.) DEV: frontend labels Nov 6, 2025
@nucleogenesis nucleogenesis requested a review from pcenov November 6, 2025 04:42
Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

This should work, if I am understanding the code correctly!

Copy link
Member

@pcenov pcenov left a comment

Choose a reason for hiding this comment

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

Thanks @nucleogenesis - the coach count is updated correctly now.

@rtibbles rtibbles merged commit cb0b46b into learningequality:develop Nov 6, 2025
52 checks passed
@rtibbles rtibbles self-assigned this Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P0 - critical Priority: Release blocker or regression SIZE: very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants