Exploring core web services API (and backporting cohort web services to 2.4 for some needs), i fall often upon those (appears to me as inconsistency) implementations that do only rely on internal Moodle ids to identify objects.
At the origin, and this has been widely extended, IDNumber extra field was introduced to precisely being able to map internal Moodle records with external course management applications.
For an example :
- you can create cohorts trough create_cohorts($cohorts), giving IDnumbers to cohorts
- you CANNOT delete cohorts based on IDNumbers
- you can add members based on cohort IDNumber and user username
- you cannot add member based on both cohort AND user IDNumber
this is for cohorts, but same incompleteness in course api, and possible other
Are there any plans to get this "external API access" being unified on external identifing information, or at least being adaptative such in add_cohort_members() function ?