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...
1 parent 7c437a5 commit 75407fe763c5a5e23a423f133f9b476d57476c3c scyrma committed Jan 30, 2008
Showing with 171 additions and 144 deletions.
  1. +13 −0 backup/restorelib.php
  2. +158 −144 lang/en_utf8/countries.php
View
@@ -1441,6 +1441,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 75407fe

Please sign in to comment.