We've written a script which programmatically adds courses to Moodle, these look to import fine and show correctly.
However when we try to enrol students nothing happens. We've tested and if we create a course in moodle we can enrol students without any issues.
I assume we've either got a setting wrong when importing course, or we are missing data.
At the moment we are creating a record in the mdl_course table and mdl_context tables, we also add records to mdl_course_sections after we have added the course acivities.
Can anyone point me in the direction of why the course aren't adding?