Is it possible to enrol users in a course by REST web service without previously manually enrolling the web service user in that course ?
I have to create a lot of courses in Moodle and i must enrol teachers and students in these courses.
I would like to do this by the web service API.
I can easily create courses with REST.
But i cannot enrol teachers in that course with enrol_manual_enrol_users, i have an exception :
<MESSAGE>Cours ou activité pas accessible.</MESSAGE> "Course or activity not accessible"
The only way i found to enrol a teacher with enrol_manual_enrol_users is to manually enrol the web service user in the course. Is there a solution to get around that problem in order to have a complete automatic process ?