Problematic behavior
Currently, when we try to create a user from the moodle api, sometimes the request can fail to an invalid format of the username. Indeed Moodle does not accept username with uppercase. When creating an account on Moodle, the username is sanitize under the hood but not when using the web service.
Expected behavior/code
OpenEdx accepts username with uppercased chars but the unique constraint on this field is not case sensitive.
So we could assume to lower case the username before trying to create a user on Moodle.
Bug Report
Problematic behavior Currently, when we try to create a user from the moodle api, sometimes the request can fail to an invalid format of the username. Indeed Moodle does not accept username with uppercase. When creating an account on Moodle, the username is sanitize under the hood but not when using the web service.
Expected behavior/code OpenEdx accepts username with uppercased chars but the unique constraint on this field is not case sensitive.
So we could assume to lower case the username before trying to create a user on Moodle.
Additional context/Screenshots