I have to write some custom code to create accounts and enroll students. In Moodle 1.6, the mdl_user table contained all the users and the mdl_user_students table contained a list of courses that each student belongs too. In Moodle 1.9 I noticed that there is no longer a mdl_user_students table. I was looking thru some of the other tables, but I can't figure out how a student is enrolled in a course in the database. I'm assuming it has something to do with roles, but I can't decipher how it works.
QUESTION #1 - Which table(s) contains the list of courses that a student is enrolled in Moodle 1.9?
QUESTION #2 - Are there any available functions within Moodle that will create new accounts and enroll students in a course that I can call without making a direct write to the database?
Thanks
P.S.- I did search thru the forums, but could not find an answer to my questions, probably due to the fact that I did not know/use the proper terminology.