Hello,
I can't find how to add user to cohort with the moodle webservice. In fact, I use this client https://github.com/moodlehq/sample-ws-clients/blob/master/PHP-SOAP/client.php to create the account :
token = 'MY PERSONNAL TOKEN';
$domainname = 'MY MOODLE SERVER';
$functionname = 'core_user_create_users';
//////// moodle_user_create_users ////////
/// PARAMETERS - NEED TO BE CHANGED IF YOU CALL A DIFFERENT FUNCTION
$user = new stdClass();
$user->username = 'testusername1';
$user->password = 'Testpassword1!';
$user->firstname = 'testfirstname1';
$user->lastname = 'testlastname1';
$user->email = 'testemail1@moodle.com';
$user->auth = 'manual';
$params = array($user);
My problem is simple :
- I can't add directly user in cohort where I'm create them
- I don't fin'd the parameters I have to use with the function 'core_cohort_add_cohort_members';
Have you idea to help me? (and sorry for my english I'm Frenchà)