I'm building an administration for a Moodle website in order to handle external database authentication and enrollment for the courses in that Moodle site. Also I want this administration to be able to create groups within courses and assign users to those courses.
This administration will be sitting in the same server as the Moodle website, but will be its own completely separate site (using its own PHP framework).
I don't know where to start in order to be able to use the API that Moodle provides for those functions I mention above. I've been looking around but I haven't found any specific information on how to go about importing the Moodle API to a website and be able to use it from there (or maybe this isn't possible?). If that's not possible, how would I go about this?
My main concern is about working with groups, since for external database enrollment and authentication Moodle comes ready to work that way, so I don't even need to use the API for that (I can manipulate that external database directly with my own code). But when it comes to handling groups I don't know how to work with that, other than directly manipulating Moodle's database, which I don't think it's a good idea.
If someone could point me in the right direction that would be awesome!