by Bret Miller.
I googled the error and found a couple of interesting references.
- See http://docs.moodle.org/26/en/error/moodle/dmlwriteexception
- It could be a table schema problem. When was the last time you verified your schema against a clean database? http://docs.moodle.org/26/en/Verify_Database_Schema