Permalink
Browse files

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.
  • Loading branch information...
scyrma
scyrma committed Jan 30, 2008
1 parent e724611 commit 7c0be404c8a91e6fed6a1f84efd045245b46b5dc
Showing with 172 additions and 145 deletions.
  1. +13 −0 backup/restorelib.php
  2. +159 −145 lang/en_utf8/countries.php
View
@@ -1382,6 +1382,19 @@ function restore_create_users($restore,$xml_file) {
$user->lang = 'mi_nt';
}
+ //Country list updates - MDL-13060
+ //Any user whose country code has been deleted or modified needs to be assigned a valid one.
+ $country_update_map = array(
+ 'ZR' => 'CD',
+ 'TP' => 'TL',
+ 'FX' => 'FR',
+ 'KO' => 'RS',
+ 'CS' => 'RS',
+ 'WA' => 'GB');
+ if (array_key_exists($user->country, $country_update_map)) {
+ $user->country = $country_update_map[$user->country];
+ }
+
//Check if it's admin and coursecreator
$is_admin = !empty($user->roles['admin']);
$is_coursecreator = !empty($user->roles['coursecreator']);
Oops, something went wrong.

0 comments on commit 7c0be40

Please sign in to comment.