June 2017
Beginner to intermediate
368 pages
8h 31m
English
Because we don't know what kind of database we might be connecting to (recall in our configuration form, we included an array of 32 different database types) that an administrator could potentially synchronize competency frameworks with. In order to connect, let us employ PHP's database abstraction layer API, ADOdb. This library is already included in Moodle--we just need to add the following line to the top of the framework_importer.php script:
require_once($CFG->libdir.'/adodb/adodb.inc.php');
Details are given at the ADOdb project's main website at http://adodb.org. Luckily, the API itself is straightforward to use. Add the following function to the framework_importer class to connect to the database: ...
Read now
Unlock full access