General help

Error on deleting users

 
Picture of koen roggemans
Re: Error on deleting users
Core developersDocumentation writersMoodle HQParticularly helpful MoodlersPlugin developersTranslators

Thank you for your response Matteo.

It seems like I'm not the only one. In the mean time I found

https://tracker.moodle.org/browse/MDL-51694

https://moodle.org/mod/forum/discuss.php?d=335075

I used 

select * from mdl_grade_grades where itemid not in (select id from mdl_grade_items)

from the tracker issue and found 2084 records on a total of 707849.


I deleted them with

DELETE from mdl_grade_grades where itemid not in (select id from mdl_grade_items)
which was mentioned in the bug.

After running the delete query all was working fine again and I managed to delete the 400 users.

I think your suggested code change would have worked too, but I preferred in this case to clean up the database - it might prevent future problems.


 
Average of ratings: Useful (1)