Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete on User fails #180

Open
awhicks opened this issue Oct 14, 2024 · 0 comments
Open

Delete on User fails #180

awhicks opened this issue Oct 14, 2024 · 0 comments

Comments

@awhicks
Copy link
Member

awhicks commented Oct 14, 2024

The admin view delete on a user fails if they have interacted with an OpenDSA course at all. There are four tables that have foreign key constraints that restrict a user from being deleted.

We need a custom delete action in the users admin page (https://github.com/OpenDSA/OpenDSA-LTI/blob/master/app/admin/users.rb) that either calls a cascading delete on the user or clears out the required tables by ID before deleting the user.

select * from users where email='email';
delete from odsa_book_progresses where user_id=num;
delete from odsa_exercise_progresses where user_id=num;
delete from odsa_module_progresses where user_id=num;
delete from odsa_user_interactions where user_id=num;
delete from users where id=num;

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

No branches or pull requests

1 participant