Hi all,
I've set up a Moodle 3.7 test server with cohort external database.
The external database contains id, username, firstname, lastname, cohort and email for 2 new users (not existing in the moodle test server). Everything installed on localhost.
example data:
id,gebtuikersnaam,voornaam,achternaam,email,klas
"1","1900001","karel","de grote","karel.degrote@ritacollege.be","1la"
"2","1900002","napoleon","bonaparte","napoleon.bonaparte@ritacollege.be","1la"
The configuration settings for the plugin are:
"1794","tool_cohortdatabase","version","2018061101"
"1795","tool_cohortdatabase","dbtype","mysqli"
"1796","tool_cohortdatabase","dbhost","localhost"
"1797","tool_cohortdatabase","dbuser","root"
"1798","tool_cohortdatabase","dbpass","banaan"
"1799","tool_cohortdatabase","dbname","school"
"1800","tool_cohortdatabase","dbencoding","utf-8"
"1801","tool_cohortdatabase","dbsetupsql",
"1802","tool_cohortdatabase","dbsybasequoting","0"
"1803","tool_cohortdatabase","debugdb","0"
"1804","tool_cohortdatabase","minrecords","1"
"1805","tool_cohortdatabase","localuserfield","idnumber"
"1806","tool_cohortdatabase","remotecohorttable","sitegroepen"
"1807","tool_cohortdatabase","remoteuserfield","inschrijvingsnummer"
"1808","tool_cohortdatabase","remotecohortidfield","klas"
"1809","tool_cohortdatabase","remotecohortnamefield","klas"
"1810","tool_cohortdatabase","remotecohortdescfield",
"1811","tool_cohortdatabase","removeaction","0"
"1812","tool_cohortdatabase","createusers","1"
"1813","tool_cohortdatabase","createusers_username","inschrijvingsnummer"
"1814","tool_cohortdatabase","createusers_email","email"
"1815","tool_cohortdatabase","createusers_firstname","voornaam"
"1816","tool_cohortdatabase","createusers_lastname","achternaam"
"1817","tool_cohortdatabase","createusers_idnumber","inschrijvingsnummer"
"1818","tool_cohortdatabase","createusers_auth","manual"
But users don't get created and the cohort "1la" is created twice.
Using "inschrijvingsnummer" for users username and ID-number is intentional.
It would be great to get this working. I'm happy to write some documentation and example source database layout for the plugin if I manage to get it going . Does anyone see my mistake?