openfun / joanie

👛 A headless ERP for education to manage course enrollment/subscription, payment and certificates delivery.
MIT License
22 stars 2 forks source link

Moodle Backend - User creation - Invalid parameter "username" #712

Closed jbpenrath closed 5 months ago

jbpenrath commented 5 months ago

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

lunika commented 5 months ago

Managed in #720