{"action":"opened","number":170,"pull_request":{"url":"https://api.github.com/repos/Microsoft/o365-moodle/pulls/170","id":77956274,"html_url":"https://github.com/Microsoft/o365-moodle/pull/170","diff_url":"https://github.com/Microsoft/o365-moodle/pull/170.diff","patch_url":"https://github.com/Microsoft/o365-moodle/pull/170.patch","issue_url":"https://api.github.com/repos/Microsoft/o365-moodle/issues/170","number":170,"state":"open","locked":false,"title":"Use proper country and default Moodle language when syncing users with AzureAD","user":{"login":"rimas-kudelis","id":2812673,"avatar_url":"https://avatars.githubusercontent.com/u/2812673?v=3","gravatar_id":"","url":"https://api.github.com/users/rimas-kudelis","html_url":"https://github.com/rimas-kudelis","followers_url":"https://api.github.com/users/rimas-kudelis/followers","following_url":"https://api.github.com/users/rimas-kudelis/following{/other_user}","gists_url":"https://api.github.com/users/rimas-kudelis/gists{/gist_id}","starred_url":"https://api.github.com/users/rimas-kudelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rimas-kudelis/subscriptions","organizations_url":"https://api.github.com/users/rimas-kudelis/orgs","repos_url":"https://api.github.com/users/rimas-kudelis/repos","events_url":"https://api.github.com/users/rimas-kudelis/events{/privacy}","received_events_url":"https://api.github.com/users/rimas-kudelis/received_events","type":"User","site_admin":false},"body":"The Azure AD API returns country names in English, so when looking up country code by name, we should specify that we need English list of countries as opposed to that in the default language.\r\n\r\nThis also removes the hardcoded `'lang' => 'en'` element from the array passed when creating the user. This means that the default Moodle language will be assigned to the user, which I think is the right thing to do when the there is no better info available.","created_at":"2016-07-19T10:59:17Z","updated_at":"2016-07-19T10:59:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d629f103476c5a980056b4c7022196be4e1e84f1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/o365-moodle/pulls/170/commits","review_comments_url":"https://api.github.com/repos/Microsoft/o365-moodle/pulls/170/comments","review_comment_url":"https://api.github.com/repos/Microsoft/o365-moodle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/o365-moodle/issues/170/comments","statuses_url":"https://api.github.com/repos/Microsoft/o365-moodle/statuses/57a952f2ccef24a9c9be92dca6a25a5d9a109b41","head":{"label":"rimas-kudelis:patch-1","ref":"patch-1","sha":"57a952f2ccef24a9c9be92dca6a25a5d9a109b41","user":{"login":"rimas-kudelis","id":2812673,"avatar_url":"https://avatars.githubusercontent.com/u/2812673?v=3","gravatar_id":"","url":"https://api.github.com/users/rimas-kudelis","html_url":"https://github.com/rimas-kudelis","followers_url":"https://api.github.com/users/rimas-kudelis/followers","following_url":"https://api.github.com/users/rimas-kudelis/following{/other_user}","gists_url":"https://api.github.com/users/rimas-kudelis/gists{/gist_id}","starred_url":"https://api.github.com/users/rimas-kudelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rimas-kudelis/subscriptions","organizations_url":"https://api.github.com/users/rimas-kudelis/orgs","repos_url":"https://api.github.com/users/rimas-kudelis/repos","events_url":"https://api.github.com/users/rimas-kudelis/events{/privacy}","received_events_url":"https://api.github.com/users/rimas-kudelis/received_events","type":"User","site_admin":false},"repo":{"id":63685712,"name":"o365-moodle","full_name":"rimas-kudelis/o365-moodle","owner":{"login":"rimas-kudelis","id":2812673,"avatar_url":"https://avatars.githubusercontent.com/u/2812673?v=3","gravatar_id":"","url":"https://api.github.com/users/rimas-kudelis","html_url":"https://github.com/rimas-kudelis","followers_url":"https://api.github.com/users/rimas-kudelis/followers","following_url":"https://api.github.com/users/rimas-kudelis/following{/other_user}","gists_url":"https://api.github.com/users/rimas-kudelis/gists{/gist_id}","starred_url":"https://api.github.com/users/rimas-kudelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rimas-kudelis/subscriptions","organizations_url":"https://api.github.com/users/rimas-kudelis/orgs","repos_url":"https://api.github.com/users/rimas-kudelis/repos","events_url":"https://api.github.com/users/rimas-kudelis/events{/privacy}","received_events_url":"https://api.github.com/users/rimas-kudelis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rimas-kudelis/o365-moodle","description":"Office 365 plugins for Moodle","fork":true,"url":"https://api.github.com/repos/rimas-kudelis/o365-moodle","forks_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/forks","keys_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/teams","hooks_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/hooks","issue_events_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/issues/events{/number}","events_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/events","assignees_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/assignees{/user}","branches_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/branches{/branch}","tags_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/tags","blobs_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/git/refs{/sha}","trees_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/statuses/{sha}","languages_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/languages","stargazers_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/stargazers","contributors_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/contributors","subscribers_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/subscribers","subscription_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/subscription","commits_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/commits{/sha}","git_commits_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/git/commits{/sha}","comments_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/comments{/number}","issue_comment_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/issues/comments{/number}","contents_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/contents/{+path}","compare_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/merges","archive_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/downloads","issues_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/issues{/number}","pulls_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/pulls{/number}","milestones_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/milestones{/number}","notifications_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/labels{/name}","releases_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/releases{/id}","deployments_url":"https://api.github.com/repos/rimas-kudelis/o365-moodle/deployments","created_at":"2016-07-19T10:47:23Z","updated_at":"2016-07-19T10:47:26Z","pushed_at":"2016-07-19T10:58:31Z","git_url":"git://github.com/rimas-kudelis/o365-moodle.git","ssh_url":"git@github.com:rimas-kudelis/o365-moodle.git","clone_url":"https://github.com/rimas-kudelis/o365-moodle.git","svn_url":"https://github.com/rimas-kudelis/o365-moodle","homepage":"","size":4716,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"dd21d6231f1f0aba5b6e7edd2605293acfeaabea","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":21705009,"name":"o365-moodle","full_name":"Microsoft/o365-moodle","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/o365-moodle","description":"Office 365 plugins for Moodle","fork":false,"url":"https://api.github.com/repos/Microsoft/o365-moodle","forks_url":"https://api.github.com/repos/Microsoft/o365-moodle/forks","keys_url":"https://api.github.com/repos/Microsoft/o365-moodle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/o365-moodle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/o365-moodle/teams","hooks_url":"https://api.github.com/repos/Microsoft/o365-moodle/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/o365-moodle/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/o365-moodle/events","assignees_url":"https://api.github.com/repos/Microsoft/o365-moodle/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/o365-moodle/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/o365-moodle/tags","blobs_url":"https://api.github.com/repos/Microsoft/o365-moodle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/o365-moodle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/o365-moodle/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/o365-moodle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/o365-moodle/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/o365-moodle/languages","stargazers_url":"https://api.github.com/repos/Microsoft/o365-moodle/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/o365-moodle/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/o365-moodle/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/o365-moodle/subscription","commits_url":"https://api.github.com/repos/Microsoft/o365-moodle/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/o365-moodle/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/o365-moodle/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/o365-moodle/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/o365-moodle/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/o365-moodle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/o365-moodle/merges","archive_url":"https://api.github.com/repos/Microsoft/o365-moodle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/o365-moodle/downloads","issues_url":"https://api.github.com/repos/Microsoft/o365-moodle/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/o365-moodle/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/o365-moodle/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/o365-moodle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/o365-moodle/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/o365-moodle/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/o365-moodle/deployments","created_at":"2014-07-10T18:12:49Z","updated_at":"2016-06-28T22:46:57Z","pushed_at":"2016-07-19T10:59:17Z","git_url":"git://github.com/Microsoft/o365-moodle.git","ssh_url":"git@github.com:Microsoft/o365-moodle.git","clone_url":"https://github.com/Microsoft/o365-moodle.git","svn_url":"https://github.com/Microsoft/o365-moodle","homepage":"","size":4716,"stargazers_count":30,"watchers_count":30,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":34,"forks":25,"open_issues":34,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/o365-moodle/pulls/170"},"html":{"href":"https://github.com/Microsoft/o365-moodle/pull/170"},"issue":{"href":"https://api.github.com/repos/Microsoft/o365-moodle/issues/170"},"comments":{"href":"https://api.github.com/repos/Microsoft/o365-moodle/issues/170/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/o365-moodle/pulls/170/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/o365-moodle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/o365-moodle/pulls/170/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/o365-moodle/statuses/57a952f2ccef24a9c9be92dca6a25a5d9a109b41"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"rimas-kudelis"}}