Please could you state exactly what the error message is.
This question of mine might be out of turn here but hoping you can point me in some direction of light. I had a post in a lot of forums about statistics getting scrambled after changing a user role. I am not so worried about the stats but I am more worried about how moodle handles user roles. A person having more than one role or a person moved from one role to another causes issues in the logs being collated. Below is a link to that thread.
Thanks in advance for the help.