Skip to content

Conversation

@AllanOXDi
Copy link
Member

@AllanOXDi AllanOXDi commented Aug 14, 2025

Summary

Fixes coaches and admins that remain assigned to a class after being deleted.

rec.mov

References

close #13640

Reviewer guidance

Assign coaches, admins and super admins to a class or several classes and then delete them
Please note: If you attempt to perform bulk delete, you will be hit by 503 which should be gracefully handled in #13614

@github-actions github-actions bot added APP: Facility Re: Facility App (user/class management, facility settings, csv import/export, etc.) APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend SIZE: medium labels Aug 14, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 14, 2025

@AllanOXDi AllanOXDi force-pushed the handle-deleting-of-coach-from-all-sections branch from f984581 to b67fd5c Compare August 19, 2025 17:41
@AllanOXDi AllanOXDi force-pushed the handle-deleting-of-coach-from-all-sections branch from b67fd5c to af89b9c Compare August 21, 2025 14:35
@AllanOXDi AllanOXDi changed the title Handle deleting of coach from all sections Handle deletion of coach from the assigned classes Aug 21, 2025
@AllanOXDi AllanOXDi marked this pull request as ready for review August 21, 2025 14:53
Copy link
Member

@nucleogenesis nucleogenesis 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 reported in #13640 should be resolved by ensuring the data populating the classes page does not get populated using soft-deleted users.

We don't want to delete any of the user's relationships to other things when they're soft-deleted, only when they're hard-deleted.

The main reason for this is that restoring a user to their former glory wouldn't be viable any longer.

I think that this is likely the best place to start looking where the Classroom is consolidating it's response. Seems like we could do some filtering there to exclude soft-deleted users.

@AllanOXDi AllanOXDi force-pushed the handle-deleting-of-coach-from-all-sections branch from af89b9c to 00c96cd Compare September 17, 2025 22:11
@github-actions github-actions bot added the DEV: backend Python, databases, networking, filesystem... label Sep 17, 2025
Copy link
Member

@nucleogenesis nucleogenesis left a comment

Choose a reason for hiding this comment

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

Code changes look good overall - let's get @pcenov 's eyes on it before dismissing my review and approving

@pcenov pcenov self-requested a review September 18, 2025 09:04
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 @AllanOXDi and @nucleogenesis, LGTM - removed coaches, admins and super admins are now also removed from the class and can be restored.

@nucleogenesis nucleogenesis dismissed their stale review September 22, 2025 03:50

Feedback has been resolved, QA has passed <3

@AllanOXDi AllanOXDi merged commit 5272b7e into learningequality:develop Sep 22, 2025
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) APP: Facility Re: Facility App (user/class management, facility settings, csv import/export, etc.) DEV: backend Python, databases, networking, filesystem... DEV: frontend SIZE: medium SIZE: small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coaches and admins remain assigned to a class after being deleted

3 participants