The file sync.php works properly only for some courses, but it doesn't enrol the users for other courses. Data are correctly loaded in the external tables, but I don't see the teachers on the courses in the site.
The data of the working courses are very similar to the not working courses so I should exclude issues in the data.
I've not changed the code and it always worked.
I would not enrol manually each user becasue they're many,
When run sync.php this message appears "[ENROL DATABASE] The sync enrolments cron script has been deprecated. Please use the scheduled task instead.".
The server is shut down each day for costs reasons, but I don't know if shutting down may introduce some issues.
I'm using Moodle 3.8.4.