Moodle
  1. Moodle
  2. MDL-13060

Need to create more "countries" in drop down menu

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.4, 1.9
    • Fix Version/s: 1.6.7, 1.7.5, 1.8.5, 1.9
    • Component/s: Enrolments
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      In the drop down menu for countries when creating profiles of participants Moodle lists "United Kingdom" and "Wales," but not England, Scotland, and Northern Ireland. This could be remedied by either adding these entities under "Country" or adding them under a new category such as "Country or Region" as it has applicability in many parts of the world.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Alex Little added a comment -

            Just voted for this as I'd noticed the anomaly too. I discovered a problem when I'm using the town & country code to geocode users locations and the users have selected "wales" as their country. Most geocoding systems don't appear to reconise "WA" as a country code and require it to be converted to "GB". So my preference would be just to remove Wales from the country list and only have UK, rather than England/Scotland/Wales/NI, as this would resolve the issues I'm having

            Show
            Alex Little added a comment - Just voted for this as I'd noticed the anomaly too. I discovered a problem when I'm using the town & country code to geocode users locations and the users have selected "wales" as their country. Most geocoding systems don't appear to reconise "WA" as a country code and require it to be converted to "GB". So my preference would be just to remove Wales from the country list and only have UK, rather than England/Scotland/Wales/NI, as this would resolve the issues I'm having
            Hide
            Martin Dougiamas added a comment -

            Hmm, look at that, Wales IS in there! I don't know who added it but I'm guessing it was Ray Kingdon many years ago.

            The list is SUPPOSED to be those only recognised by ISO (precisely for the kind of reasons Alex points out):

            http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm

            I think we should remove it in 1.9 and fix all existing user accounts during the upgrade.

            James, if you want a region field you can add that using the custom user profile fields in 1.8 and later.

            Show
            Martin Dougiamas added a comment - Hmm, look at that, Wales IS in there! I don't know who added it but I'm guessing it was Ray Kingdon many years ago. The list is SUPPOSED to be those only recognised by ISO (precisely for the kind of reasons Alex points out): http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm I think we should remove it in 1.9 and fix all existing user accounts during the upgrade. James, if you want a region field you can add that using the custom user profile fields in 1.8 and later.
            Hide
            Martin Dougiamas added a comment -

            Mat, can you please review this file against ISO codes for 1.9 (only) and

            • add any new ones that are missing and
            • delete any that are extra (like Wales). For each of these you need to do a quick set_field() call in lib/db/upgrade.php to fix any entries in the user table that are using the obsolete countries.
            Show
            Martin Dougiamas added a comment - Mat, can you please review this file against ISO codes for 1.9 (only) and add any new ones that are missing and delete any that are extra (like Wales). For each of these you need to do a quick set_field() call in lib/db/upgrade.php to fix any entries in the user table that are using the obsolete countries.
            Hide
            Mathieu Petit-Clair added a comment -

            The list is now in 19_STABLE. The ISO also distributes an official French version that we could use. Translators will have to come up with translations for other languages.

            Show
            Mathieu Petit-Clair added a comment - The list is now in 19_STABLE. The ISO also distributes an official French version that we could use. Translators will have to come up with translations for other languages.
            Hide
            Joseph Rézeau added a comment -
            Show
            Joseph Rézeau added a comment - Here is the address for French country names: http://www.iso.org/iso/country_codes/iso_3166_code_lists/french_country_names_and_code_elements.htm Joseph
            Hide
            Joseph Rézeau added a comment -

            File \moodle\lang\en_utf8\countries.php should be encoded UTF8 because it contains French accents for countries such as Côte d'Ivoire, etc.
            I am attaching correctly encoded file.
            Joseph

            Show
            Joseph Rézeau added a comment - File \moodle\lang\en_utf8\countries.php should be encoded UTF8 because it contains French accents for countries such as Côte d'Ivoire, etc. I am attaching correctly encoded file. Joseph
            Hide
            Joseph Rézeau added a comment -

            correctly utf-8 encoded coutries file

            Show
            Joseph Rézeau added a comment - correctly utf-8 encoded coutries file
            Hide
            Petr Skoda added a comment -

            do I miss something, where is the upgrade code for existing sites and backup restore?

            Show
            Petr Skoda added a comment - do I miss something, where is the upgrade code for existing sites and backup restore?
            Hide
            Mathieu Petit-Clair added a comment -

            Sorry, I missed the upgrade part.. will do that now. Thanks for the re-encoding, Joseph.

            Show
            Mathieu Petit-Clair added a comment - Sorry, I missed the upgrade part.. will do that now. Thanks for the re-encoding, Joseph.
            Hide
            Mathieu Petit-Clair added a comment -

            Ok, upgrade path commited to 19_STABLE, 18_STABLE, 17_STABLE and 16_STABLE. The unicode-encoded file was also commited earlier today. The official ISO French version of the list was commited by martignoni earlier today.

            Show
            Mathieu Petit-Clair added a comment - Ok, upgrade path commited to 19_STABLE, 18_STABLE, 17_STABLE and 16_STABLE. The unicode-encoded file was also commited earlier today. The official ISO French version of the list was commited by martignoni earlier today.
            Hide
            Mathieu Petit-Clair added a comment -

            Commited the upgrade path for backup files .. along with the country list for older version (which I had apparently forgotten to commit yesterday!)

            Show
            Mathieu Petit-Clair added a comment - Commited the upgrade path for backup files .. along with the country list for older version (which I had apparently forgotten to commit yesterday!)
            Hide
            Nicolas Martignoni added a comment -

            Verified on 1.9b4. Closing. Thanks.

            Show
            Nicolas Martignoni added a comment - Verified on 1.9b4. Closing. Thanks.
            Hide
            Koen Roggemans added a comment -

            I have my doubts on the accuracy of the used list: Zaïre is in it, and that is not a country any more since 17 May 1997

            Show
            Koen Roggemans added a comment - I have my doubts on the accuracy of the used list: Zaïre is in it, and that is not a country any more since 17 May 1997
            Hide
            Nicolas Martignoni added a comment -

            In fact in countries.php (english lang pack), there are two strings for the $string['CD'] key, one for the correct "Congo, The Democratic Republic Of The" and one later in the file for "Zaire", which should indeed be deleted.

            I'm surprised, since the text version of the ISO (http://www.iso.org/iso/iso3166_en_code_lists.txt) doesn't list Zaire.

            Show
            Nicolas Martignoni added a comment - In fact in countries.php (english lang pack), there are two strings for the $string ['CD'] key, one for the correct "Congo, The Democratic Republic Of The" and one later in the file for "Zaire", which should indeed be deleted. I'm surprised, since the text version of the ISO ( http://www.iso.org/iso/iso3166_en_code_lists.txt ) doesn't list Zaire.
            Hide
            Nicolas Martignoni added a comment -

            Re-opening since the removing of Zaire in the file.

            Show
            Nicolas Martignoni added a comment - Re-opening since the removing of Zaire in the file.
            Hide
            Nicolas Martignoni added a comment -

            Sorry for the spam: another duplicate key: $string['VA']. The correct one is "Holy See (Vatican City State)". The other should be deleted.

            PS In the above comment, please read "until" instead of "since".

            Show
            Nicolas Martignoni added a comment - Sorry for the spam: another duplicate key: $string ['VA'] . The correct one is "Holy See (Vatican City State)". The other should be deleted. PS In the above comment, please read "until" instead of "since".
            Hide
            James Skelly added a comment -

            The problem of Zaire is not unique. Bouvet Island is an uinhabited island belonging to Norway, and Svalbard and Jan Mayen islands are also under the Norwegians dominion. The Cocos Islands, which along with Christmas Island are territories of Australia, as are the barren uninhabited Heard and McDonald Islands. Hong Kong has been officially part of China for over a decade. Mayotte is included in a French Department and not independent; Wallis and Futuna Islands are part of French Polynesian territory; Montenegro and Serbia are only listed as "Serbia and Montenegro" and Kosovo is still today a province of Serbia, but perhaps not by the end of the week. And let's not forget the thorny issue of "Palestine" which has less control over its fate than Wales with which this discussion started..

            Show
            James Skelly added a comment - The problem of Zaire is not unique. Bouvet Island is an uinhabited island belonging to Norway, and Svalbard and Jan Mayen islands are also under the Norwegians dominion. The Cocos Islands, which along with Christmas Island are territories of Australia, as are the barren uninhabited Heard and McDonald Islands. Hong Kong has been officially part of China for over a decade. Mayotte is included in a French Department and not independent; Wallis and Futuna Islands are part of French Polynesian territory; Montenegro and Serbia are only listed as "Serbia and Montenegro" and Kosovo is still today a province of Serbia, but perhaps not by the end of the week. And let's not forget the thorny issue of "Palestine" which has less control over its fate than Wales with which this discussion started..
            Hide
            Mathieu Petit-Clair added a comment -

            Removed both duplicates.. This should fix the issue for good, at least until a new list comes out of ISO.

            Show
            Mathieu Petit-Clair added a comment - Removed both duplicates.. This should fix the issue for good, at least until a new list comes out of ISO.
            Hide
            Nicolas Martignoni added a comment -

            Thanks Matthieu. Closing again.

            Show
            Nicolas Martignoni added a comment - Thanks Matthieu. Closing again.

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: