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.
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;
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;