Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.2.1
-
None
-
MOODLE_32_STABLE
-
MOODLE_33_STABLE
Description
We have an azure database that we want to use as a source of our enrolments.
The sqlsrv driver by microsoft is now available for both linux and windows so it's no longer only windows servers that can connect with azure or sql server through this driver.
I noticed the external database enrolment plugin uses adodb in the background, adodb already has support for pdo_sqlsrv so it's mostly a matter of changing the settings form to allow you to select this driver.
I've tested it out myself with moodle 3.2.1 by hardcoding some changes in enrol/database/lib.php
change line 870 to: $extdb = ADONewConnection('PDO');
change line 878 to: $result = $extdb->Connect('sqlsrv:server=SERVERNAME;database=DATABASENAME', $this->config->user, $this->config->pass);
Everything seemed to work without problems with this hardcoded version. I suppose the biggest issue is the fact that the connection string through PDO looks very different from the currently supported database types. Which makes it more work to add this then simply expanding the options list with one extra option.
Attachments
Issue Links
- has been marked as being related by
-
MDL-57686 add support for PDO databases in auth_db
-
- Closed
-