Moodle 1.8 - Ext DB Enrolement problems

Moodle 1.8 - Ext DB Enrolement problems

by Giles Hamson -
Number of replies: 3

Hi all,

I hope you can help.

I am trying to achieve auto enrolement via an external database using Moodle 1.8 and have been running into issues.

Having checked the PHP, Apache and MySQL logs I resolved one issue.  (Connection problems due to the servername)  However, after checking through the forums and following a few steps I appear to have got stuck.

Typically I am trying to match the mdl_user.idnumber and mdl_course.idnumber fields as mentioned in various forum posts.  I have created the external database with the exact same field settings to avoid any potential conflict.

Can anyone guide me further please?  I have provided examples of the setup below:

Details:

External DB - MySQL

Table Name: gileshenrol

Fields:

id: autonumber (INTEGER) (Primary Key)

user_idnumber (VARCHAR(64))

course_idnumber (VARCHAR(100))

DB Enrol Settings pictures can be seen below:

Part 1

EEDEVMOODLE01_DBEnrolSettings1.JPG

Part 2:

EEDEVMOODLE01_DBEnrolSettings2.JPG

Kind Regards

Giles

Average of ratings: -
In reply to Giles Hamson

Re: Moodle 1.8 - Ext DB Enrolement problems

by Clinton Graham -
There is no need to prefix the fields in your settings with the tablenames for either local or remote fields.

I.e., enrol_localcoursefield should be set to "idnumber" not "mdl_course.idnumber".


In reply to Clinton Graham

Re: Moodle 1.8 - Ext DB Enrolement problems

by Giles Hamson -

Many thanks for responding.

I have tried as your suggestions of taking out the tablenames but it does not appear to be working...

We are also using the NTLM Authentication Plugin available from the Modules page - I don't know if this would cause any problems would it?

Any suggestions so I can move forward are greatly appreciated

Kind Regards

Giles

In reply to Giles Hamson

Re: Moodle 1.8 - Ext DB Enrolement problems

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Do you get any errors? Any output in the PHP logs? As a last ressort, you could edit .../moodle/enrol/database/enrol.php and remove the leading '//' from the error_log lines in the setup_enrolment() function to get additional error logging, to see what's going on.

Saludos. Iñaki.