error/moodle/couldnotassignrole
From MoodleDocs
If your Moodle indicates that it could not assign a role and you have recently upgraded your install use phpMyAdmin to verify that your MYSQL database contains the proper information in mdl_role_capabilities.
See also
- Using Moodle Administrator role damaged forum discussion