I have been trying for the past two weeks to get Moodle to enroll students using an external database. The external database is on the same server that Moodle is on. The external database is a MySQL database. I have tried everything I can think of and I continuously get the following error message: [ENROL_DB] Could not make a connection. All of the students and student ID numbers have been uploaded into Moodle. Many of the course ID #s have been entered as well (I would like Moodle to autocreate the remaining course ID #s that have not been entered). I have tried logging in as students after updating the configuration for the external database settings using all the various possible settings I can think of, and all my students still remain unenrolled. I have also tried running the enrolment syncing cron job to have the enrolments synced, but it did not enroll anyone. I have read through all the forum posts that I could find related to this issue and have yet to find anything that works.
Here are my current settings:
enrol_dbtype: mysql
enrol_dbhost: (I have a shared IP address, so I put that here)
enrol_dbuser: (Here, I entered my username that is needed to log on to the server)
enrol_dbpassword: (Here, I entered the password used to log on to my server)
enrol_dbname: (the name of my database)
enrol_dbtable: Moodle_UserCourses
enrol_localcoursefield: idnumber
enrol_localuserfield: idnumber
enrol_db_localrolefield: shortname
enrol_remotecoursefield: idnumber
enrol_remoteuserfield: username
enrol_db_remoterolefield: role
And then autocreate is turned on and is set to place classes in a category called "Unassigned".
I can supply additional information; I am just not sure what information is needed. I am by no means a computer expert, so I'd greatly appreciate whatever help you could offer.
Thanks,
Scott