External database enrolment for version 3.6

External database enrolment for version 3.6

Jerry Lau -
回帖数:1

Hello folks

We are running version 3.6.x on a RHEL 7.6 64-BIT, PHP 7.7.2 and MySQL 5.7

Our external database enrolment was working great in previous versions 3.4.x but now we noticed that the enrolments are missing enrolments.

I read this and there is a subtle difference now I think

https://docs.moodle.org/37/en/External_database_enrolment#Synchronising_external_database_enrolments_.28scheduled_task_and_deprecated_script.29

Do users have to EXIST or created in moodle for this to work? In previous moodle versions, if a user does not exist but has a record in the external enrolment database and sychronized, Moodle would automatically create that account regardless if they exist in Moodle or not in the user table.

So do they have to exist before the synchronization script is called?

I am using the "/path/to/moodle/enrol/database/cli/sync.php"  just past midnight once a day.

What am I doing wrong and what areas should I check (and how to check) that my settings are okay?

Thanks

Jerry




回复Jerry Lau

Re: External database enrolment for version 3.6

Acqua Alta -
Particularly helpful Moodlers的头像
Hi Jerry,

  • I think you have a typo - PHP 7.7.2 does not exist yet 微笑

  • Having a user in the system in the first place, seems to be like a basic requirement for enrolling him/her in courses.
    How do you sync users to the system? What I would do is to first verify that the users sync is working flawlessly and only then go forward with the enrollments sync.