Issue Details (XML | Word | Printable)

Key: MDL-13060
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Mathieu Petit-Clair
Reporter: James Skelly
Votes: 1
Watchers: 4
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Need to create more "countries" in drop down menu

Created: 20/Jan/08 12:27 AM   Updated: 04/Mar/08 12:51 PM
Return to search
Component/s: Enrolments
Affects Version/s: 1.8.4, 1.9
Fix Version/s: 1.6.7, 1.7.5, 1.8.5, 1.9

File Attachments: 1. File countries.php (8 kB)

Issue Links:
Duplicate
 

Participants: Alex Little, James Skelly, Joseph Rézeau, Koen Roggemans, Martin Dougiamas, Mathieu Petit-Clair, Nicolas Martignoni and Petr Skoda
Security Level: None
QA Assignee: Nicolas Martignoni
Resolved date: 04/Feb/08
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
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.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Alex Little added a comment - 24/Jan/08 08:43 PM
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

Martin Dougiamas added a comment - 24/Jan/08 10:05 PM
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.


Martin Dougiamas added a comment - 24/Jan/08 10:08 PM
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.

Martin Dougiamas made changes - 24/Jan/08 10:08 PM
Field Original Value New Value
Assignee Martin Dougiamas [ dougiamas ] Mathieu Petit-Clair [ scyrma ]
Martin Dougiamas made changes - 24/Jan/08 10:08 PM
Fix Version/s 1.9 [ 10190 ]
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 28/Jan/08 05:30 PM
Imported and replaced country list to fix MDL-13060. The new list is the exact ISO list. Note that an official list also exists in French, but we will need to
do translations to other languages.
MODIFY lang/en_utf8/countries.php   Rev. 1.2.8.1    (+152 -144 lines)
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' - 28/Jan/08 05:40 PM
Imported and replaced country list to fix MDL-13060. The new list is the exact ISO list. Note that an official list also exists in French, but we will need to
do translations to other languages. (Merge from 19_STABLE)
MODIFY lang/en_utf8/countries.php   Rev. 1.3    (+152 -144 lines)
Mathieu Petit-Clair added a comment - 28/Jan/08 05:43 PM
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.

Mathieu Petit-Clair made changes - 28/Jan/08 05:43 PM
Fix Version/s 1.9.2 [ 10241 ]
Fix Version/s 2.0 [ 10122 ]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 1.9 [ 10190 ]
Joseph Rézeau added a comment - 28/Jan/08 06:52 PM

Joseph Rézeau added a comment - 28/Jan/08 07:29 PM
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

Joseph Rézeau made changes - 28/Jan/08 07:29 PM
Status Resolved [ 5 ] Reopened [ 4 ]
Resolution Fixed [ 1 ]
Joseph Rézeau added a comment - 28/Jan/08 07:30 PM
correctly utf-8 encoded coutries file

Joseph Rézeau made changes - 28/Jan/08 07:30 PM
Attachment countries.php [ 12962 ]
martignoni committed 1 file to 'Lang CVS' - 28/Jan/08 09:45 PM
Imported and replaced country list to fix MDL-13060. The new list is the exact ISO list.
MODIFY fr_utf8/countries.php   Rev. 1.4    (+176 -170 lines)
Nicolas Martignoni made changes - 28/Jan/08 09:56 PM
QA Assignee mina
Affects Version/s 1.9 [ 10190 ]
Nicolas Martignoni made changes - 28/Jan/08 11:03 PM
Link This issue is duplicated by MDL-8508 [ MDL-8508 ]
Mitsuhiro Yoshida committed 2 files to 'Lang CVS' - 29/Jan/08 01:24 AM
Translated new strings and brushed up translated strings for country list MDL-13060.
MODIFY ja_utf8/README   Rev. 1.628    (+1 -1 lines)
MODIFY ja_utf8/countries.php   Rev. 1.4    (+20 -8 lines)
Petr Skoda added a comment - 29/Jan/08 08:51 AM
do I miss something, where is the upgrade code for existing sites and backup restore?

Mathieu Petit-Clair added a comment - 29/Jan/08 10:05 AM
Sorry, I missed the upgrade part.. will do that now. Thanks for the re-encoding, Joseph.

Mathieu Petit-Clair committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 29/Jan/08 12:34 PM
No changes - only recoded to utf8. (MDL-13060)
MODIFY lang/en_utf8/countries.php   Rev. 1.2.8.3    (+254 -254 lines)
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' - 29/Jan/08 12:35 PM
No changes - only recoded to utf8. (MDL-13060) (Merged from 19_STABLE)
MODIFY lang/en_utf8/countries.php   Rev. 1.4    (+254 -254 lines)
Mathieu Petit-Clair committed 2 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 29/Jan/08 02:47 PM
Upgrade path for MDL-13060.
MODIFY lib/db/upgrade.php   Rev. 1.154.2.17    (+16 -1 lines)
MODIFY version.php   Rev. 1.563.2.16    (+1 -1 lines)
Mathieu Petit-Clair committed 2 files to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 29/Jan/08 02:48 PM
Upgrade path for MDL-13060.
MODIFY lib/db/upgrade.php   Rev. 1.27.2.24    (+15 -1 lines)
MODIFY version.php   Rev. 1.425.2.26    (+1 -1 lines)
Mathieu Petit-Clair committed 2 files to 'Moodle CVS' on branch 'MOODLE_17_STABLE' - 29/Jan/08 02:48 PM
Upgrade path for MDL-13060.
MODIFY version.php   Rev. 1.406.2.20    (+1 -1 lines)
MODIFY lib/db/upgrade.php   Rev. 1.3.2.6    (+15 -1 lines)
Mathieu Petit-Clair committed 3 files to 'Moodle CVS' on branch 'MOODLE_16_STABLE' - 29/Jan/08 02:51 PM
Upgrade path for MDL-13060.
MODIFY lib/db/Attic/mysql.php   Rev. 1.203.4.2    (+15 -2 lines)
MODIFY version.php   Rev. 1.347.4.6    (+1 -1 lines)
MODIFY lib/db/Attic/postgres7.php   Rev. 1.184.4.2    (+15 -1 lines)
Mathieu Petit-Clair committed 2 files to 'Moodle CVS' - 29/Jan/08 02:54 PM
Upgrade path for MDL-13060. (merge from 19_STABLE)
MODIFY version.php   Rev. 1.575    (+1 -1 lines)
MODIFY lib/db/upgrade.php   Rev. 1.175    (+16 -1 lines)
Mathieu Petit-Clair added a comment - 29/Jan/08 02:59 PM
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.

Mathieu Petit-Clair made changes - 29/Jan/08 03:01 PM
Fix Version/s 1.6.7 [ 10250 ]
Fix Version/s 1.7.5 [ 10251 ]
Affects Version/s 1.5.4 [ 10109 ]
Fix Version/s 1.8.5 [ 10252 ]
Affects Version/s 2.0 [ 10122 ]
Affects Version/s 1.9 [ 10190 ]
Affects Version/s 1.9.2 [ 10241 ]
Affects Version/s 1.6.6 [ 10211 ]
Affects Version/s 1.7.4 [ 10243 ]
Mathieu Petit-Clair made changes - 29/Jan/08 03:01 PM
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Mathieu Petit-Clair committed 2 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 30/Jan/08 02:23 PM
MDL-13060 - upgrade path for users (re)created from backup files
MODIFY lang/en_utf8/countries.php   Rev. 1.2.8.4    (+7 -1 lines)
MODIFY backup/restorelib.php   Rev. 1.283.2.14    (+13 -1 lines)
Mathieu Petit-Clair committed 2 files to 'Moodle CVS' on branch 'MOODLE_17_STABLE' - 30/Jan/08 04:42 PM
Imported and replaced country list to fix MDL-13060. The new list is the exact ISO list. Note that an official list also exists in French, but we will need to
do translations to other languages. This commit also includes the restorelib upgrade path.
MODIFY lang/en_utf8/countries.php   Rev. 1.1.8.2    (+158 -144 lines)
MODIFY backup/restorelib.php   Rev. 1.197.2.23    (+14 -1 lines)
Mathieu Petit-Clair committed 2 files to 'Moodle CVS' on branch 'MOODLE_16_STABLE' - 30/Jan/08 04:45 PM
Imported and replaced country list to fix MDL-13060. The new list is the exact ISO list. Note that an official list also exists in French, but we will need to
do translations to other languages. This commit also includes the restorelib upgrade path.
MODIFY backup/restorelib.php   Rev. 1.166.6.6    (+14 -1 lines)
MODIFY lang/en_utf8/countries.php   Rev. 1.1.2.1    (+159 -145 lines)
Mathieu Petit-Clair committed 2 files to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 30/Jan/08 04:49 PM
Imported and replaced country list to fix MDL-13060. The new list is the exact ISO list. Note that an official list also exists in French, but we will need to
do translations to other languages. This commit also includes the restorelib upgrade path.
MODIFY backup/restorelib.php   Rev. 1.218.2.33    (+13 -1 lines)
MODIFY lang/en_utf8/countries.php   Rev. 1.2.4.1    (+158 -144 lines)
Mathieu Petit-Clair added a comment - 30/Jan/08 05:03 PM
Commited the upgrade path for backup files .. along with the country list for older version (which I had apparently forgotten to commit yesterday!)

martignoni committed 1 file to 'Lang CVS' - 30/Jan/08 06:48 PM
Comment added about the ISO 3166 standard. See MDL-13060.
MODIFY fr_utf8/countries.php   Rev. 1.6    (+4 -0 lines)
Nicolas Martignoni added a comment - 01/Feb/08 05:08 AM
Verified on 1.9b4. Closing. Thanks.

Nicolas Martignoni made changes - 01/Feb/08 05:08 AM
Status Resolved [ 5 ] Closed [ 6 ]
Koen Roggemans added a comment - 04/Feb/08 05:52 AM
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

Nicolas Martignoni added a comment - 04/Feb/08 06:40 AM
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.


Nicolas Martignoni added a comment - 04/Feb/08 06:40 AM
Re-opening since the removing of Zaire in the file.

Nicolas Martignoni made changes - 04/Feb/08 06:40 AM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Nicolas Martignoni added a comment - 04/Feb/08 06:48 AM
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".


James Skelly added a comment - 04/Feb/08 08:05 AM
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..

Mathieu Petit-Clair committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 04/Feb/08 09:48 AM
MDL-13060 - removing old entries fro VA and CD
MODIFY lang/en_utf8/countries.php   Rev. 1.2.8.6    (+1 -3 lines)
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 04/Feb/08 09:48 AM
MDL-13060 - removing old entries fro VA and CD
MODIFY lang/en_utf8/countries.php   Rev. 1.2.4.2    (+1 -3 lines)
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' on branch 'MOODLE_17_STABLE' - 04/Feb/08 09:48 AM
MDL-13060 - removing old entries fro VA and CD
MODIFY lang/en_utf8/countries.php   Rev. 1.1.8.3    (+1 -3 lines)
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' on branch 'MOODLE_16_STABLE' - 04/Feb/08 09:48 AM
MDL-13060 - removing old entries fro VA and CD
MODIFY lang/en_utf8/countries.php   Rev. 1.1.2.2    (+1 -3 lines)
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' - 04/Feb/08 09:48 AM
MDL-13060 - removing old entries fro VA and CD
MODIFY lang/en_utf8/countries.php   Rev. 1.6    (+0 -2 lines)
Mathieu Petit-Clair added a comment - 04/Feb/08 09:53 AM
Removed both duplicates.. This should fix the issue for good, at least until a new list comes out of ISO.

Mathieu Petit-Clair made changes - 04/Feb/08 09:53 AM
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Nicolas Martignoni added a comment - 04/Feb/08 04:30 PM
Thanks Matthieu. Closing again.

Nicolas Martignoni made changes - 04/Feb/08 04:30 PM
Status Resolved [ 5 ] Closed [ 6 ]
Martin Dougiamas made changes - 04/Mar/08 12:50 PM
Affects Version/s 1.9.2 [ 10241 ]
Affects Version/s 1.9 [ 10190 ]
Affects Version/s 2.0 [ 10122 ]
Affects Version/s 1.5.4 [ 10109 ]
Affects Version/s 1.7.4 [ 10243 ]
Affects Version/s 1.6.6 [ 10211 ]
Martin Dougiamas made changes - 04/Mar/08 12:50 PM
Fix Version/s 2.0 [ 10122 ]
Martin Dougiamas made changes - 04/Mar/08 12:51 PM
Fix Version/s 1.9 [ 10190 ]
Fix Version/s 1.9.2 [ 10241 ]