Ill really appreciate some help! So, i need to construct an internal paymanet methot and, after paymant confirmation, the user have to be inserted on moodle's user table and enrolled in a course..
until now, im stocked on enroll the user to a course:
When i try to enroll a user ( with id=8) in a course (with id = 2) from moodle interface, i see this line on mdl_user_enrolments:
... i just dont know from were this enrolid come from... and why its not the course id, but it seams to be related to it...
rrrr! help please!!!