I have been asked to create an engine that transform our data on SQL to Moodle data (user, courses, enrollments).
i got stuck at a point where i need to enroll a student programmatically using Moodle API without the need to manipulate the database.
like: enroll_user($courseid, $userid)
does anyone have any input regarding this?