How to map the country field with external database authentication?

Re: How to map the country field with external database authentication?

av Marcus Green -
Antall svar: 1
Bilde av Core developers Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers
Core Moodle includes a user field that allows the selection from a list of ISO 3166 country names to be stored and displayed in the dropdown selection box on a user profile page. These values can be seen here.


The country name you are using may not always exactly map to the ISO name, e.g. the official name of what I think of as “The Czech Republic” is stored as the ISO country name of Czechia. These values are stored in a file called
lang\en\countries.php
in the form
$string['GB'] = 'United Kingdom';

So as you say it is not a free form field, but a key/pair mapping. It will also depend on what country name you are using (i.e. is it the ISO name as listed in that Wikipedia link)



Gjennomsnittlig vurdering:Useful (1)