{"action":"created","comment":{"url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments/92922909","pull_request_review_id":13447747,"id":92922909,"diff_hunk":"@@ -130,6 +131,37 @@ public String addUserIdToUrl(String link) {\n         }\n         return result;\n     }\n+\n+    /**\n+     * Returns the nationalities as HTML code.\n+     */\n+    public static List<ElementTag> getNationalitiesAsElementTags(String existingNationality) {\n+        List<String> nationalities = NationalityHelper.getNationalities();\n+        List<ElementTag> result = new ArrayList<ElementTag>();\n+\n+        result.add(createOption(\"--- Select ---\", \"\", !nationalities.contains(existingNationality)));\n+\n+        for (String nationality : nationalities) {\n+            ElementTag option = createOption(nationality, nationality, nationality.equals(existingNationality));\n+            result.add(option);\n+        }\n+\n+        return result;\n+    }\n+\n+    /**\n+     * Creates and returns a String if the existing nationality is incorrect.\n+     */\n+    public static String getLegacyNationality(String existingNationality) {\n+        List<String> nationalities = NationalityHelper.getNationalities();\n+        String result = null;\n+        if (nationalities.contains(existingNationality) || \"\".equals(existingNationality)) {\n+            result = \"\";\n+        } else {\n+            result = \"Current value: \" + existingNationality;\n+        }\n+        return result;","path":"src/main/java/teammates/ui/controller/PageData.java","position":62,"original_position":62,"commit_id":"2a17d4a00c28f097c10813484beffa01473eec00","original_commit_id":"2a17d4a00c28f097c10813484beffa01473eec00","user":{"login":"wkurniawan07","id":7261051,"avatar_url":"https://avatars.githubusercontent.com/u/7261051?v=3","gravatar_id":"","url":"https://api.github.com/users/wkurniawan07","html_url":"https://github.com/wkurniawan07","followers_url":"https://api.github.com/users/wkurniawan07/followers","following_url":"https://api.github.com/users/wkurniawan07/following{/other_user}","gists_url":"https://api.github.com/users/wkurniawan07/gists{/gist_id}","starred_url":"https://api.github.com/users/wkurniawan07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkurniawan07/subscriptions","organizations_url":"https://api.github.com/users/wkurniawan07/orgs","repos_url":"https://api.github.com/users/wkurniawan07/repos","events_url":"https://api.github.com/users/wkurniawan07/events{/privacy}","received_events_url":"https://api.github.com/users/wkurniawan07/received_events","type":"User","site_admin":false},"body":"Line 157-163 can be shortened to:\r\n```java\r\nif (...) {\r\n    return \"\";\r\n}\r\nreturn ...;\r\n```","created_at":"2016-12-17T15:01:21Z","updated_at":"2016-12-17T15:12:45Z","html_url":"https://github.com/TEAMMATES/teammates/pull/6207#discussion_r92922909","pull_request_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6207","_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments/92922909"},"html":{"href":"https://github.com/TEAMMATES/teammates/pull/6207#discussion_r92922909"},"pull_request":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6207"}}},"pull_request":{"url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6207","id":96998358,"html_url":"https://github.com/TEAMMATES/teammates/pull/6207","diff_url":"https://github.com/TEAMMATES/teammates/pull/6207.diff","patch_url":"https://github.com/TEAMMATES/teammates/pull/6207.patch","issue_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/6207","number":6207,"state":"open","locked":false,"title":"Change nationality field in student profile page to dropdown list #5856","user":{"login":"sznicci","id":8382849,"avatar_url":"https://avatars.githubusercontent.com/u/8382849?v=3","gravatar_id":"","url":"https://api.github.com/users/sznicci","html_url":"https://github.com/sznicci","followers_url":"https://api.github.com/users/sznicci/followers","following_url":"https://api.github.com/users/sznicci/following{/other_user}","gists_url":"https://api.github.com/users/sznicci/gists{/gist_id}","starred_url":"https://api.github.com/users/sznicci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sznicci/subscriptions","organizations_url":"https://api.github.com/users/sznicci/orgs","repos_url":"https://api.github.com/users/sznicci/repos","events_url":"https://api.github.com/users/sznicci/events{/privacy}","received_events_url":"https://api.github.com/users/sznicci/received_events","type":"User","site_admin":false},"body":"Fixes #5856\r\n\r\nI have replaced the student nationality field with a dropdown list.\r\n<!--\r\nPlease follow the naming conventions in the \"guidelines for contributing\" link above or the pull request may be rejected.\r\n\r\nAlso, do consider outlining the solution taken as doing so will likely help in the reviewing process\r\n(e.g., when the pull request involves non-trivial changes)\r\n-->\r\n","created_at":"2016-12-07T20:13:00Z","updated_at":"2016-12-17T15:12:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98c2eb37f467d73ddf336f64eadcb24af7b32c4d","assignee":{"login":"wkurniawan07","id":7261051,"avatar_url":"https://avatars.githubusercontent.com/u/7261051?v=3","gravatar_id":"","url":"https://api.github.com/users/wkurniawan07","html_url":"https://github.com/wkurniawan07","followers_url":"https://api.github.com/users/wkurniawan07/followers","following_url":"https://api.github.com/users/wkurniawan07/following{/other_user}","gists_url":"https://api.github.com/users/wkurniawan07/gists{/gist_id}","starred_url":"https://api.github.com/users/wkurniawan07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkurniawan07/subscriptions","organizations_url":"https://api.github.com/users/wkurniawan07/orgs","repos_url":"https://api.github.com/users/wkurniawan07/repos","events_url":"https://api.github.com/users/wkurniawan07/events{/privacy}","received_events_url":"https://api.github.com/users/wkurniawan07/received_events","type":"User","site_admin":false},"assignees":[{"login":"wkurniawan07","id":7261051,"avatar_url":"https://avatars.githubusercontent.com/u/7261051?v=3","gravatar_id":"","url":"https://api.github.com/users/wkurniawan07","html_url":"https://github.com/wkurniawan07","followers_url":"https://api.github.com/users/wkurniawan07/followers","following_url":"https://api.github.com/users/wkurniawan07/following{/other_user}","gists_url":"https://api.github.com/users/wkurniawan07/gists{/gist_id}","starred_url":"https://api.github.com/users/wkurniawan07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkurniawan07/subscriptions","organizations_url":"https://api.github.com/users/wkurniawan07/orgs","repos_url":"https://api.github.com/users/wkurniawan07/repos","events_url":"https://api.github.com/users/wkurniawan07/events{/privacy}","received_events_url":"https://api.github.com/users/wkurniawan07/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6207/commits","review_comments_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6207/comments","review_comment_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/6207/comments","statuses_url":"https://api.github.com/repos/TEAMMATES/teammates/statuses/2a17d4a00c28f097c10813484beffa01473eec00","head":{"label":"sznicci:5856-change-nationality-field-in-student-profile","ref":"5856-change-nationality-field-in-student-profile","sha":"2a17d4a00c28f097c10813484beffa01473eec00","user":{"login":"sznicci","id":8382849,"avatar_url":"https://avatars.githubusercontent.com/u/8382849?v=3","gravatar_id":"","url":"https://api.github.com/users/sznicci","html_url":"https://github.com/sznicci","followers_url":"https://api.github.com/users/sznicci/followers","following_url":"https://api.github.com/users/sznicci/following{/other_user}","gists_url":"https://api.github.com/users/sznicci/gists{/gist_id}","starred_url":"https://api.github.com/users/sznicci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sznicci/subscriptions","organizations_url":"https://api.github.com/users/sznicci/orgs","repos_url":"https://api.github.com/users/sznicci/repos","events_url":"https://api.github.com/users/sznicci/events{/privacy}","received_events_url":"https://api.github.com/users/sznicci/received_events","type":"User","site_admin":false},"repo":{"id":70702135,"name":"teammates","full_name":"sznicci/teammates","owner":{"login":"sznicci","id":8382849,"avatar_url":"https://avatars.githubusercontent.com/u/8382849?v=3","gravatar_id":"","url":"https://api.github.com/users/sznicci","html_url":"https://github.com/sznicci","followers_url":"https://api.github.com/users/sznicci/followers","following_url":"https://api.github.com/users/sznicci/following{/other_user}","gists_url":"https://api.github.com/users/sznicci/gists{/gist_id}","starred_url":"https://api.github.com/users/sznicci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sznicci/subscriptions","organizations_url":"https://api.github.com/users/sznicci/orgs","repos_url":"https://api.github.com/users/sznicci/repos","events_url":"https://api.github.com/users/sznicci/events{/privacy}","received_events_url":"https://api.github.com/users/sznicci/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sznicci/teammates","description":"This is the project website for the TEAMMATES feedback management tool for education","fork":true,"url":"https://api.github.com/repos/sznicci/teammates","forks_url":"https://api.github.com/repos/sznicci/teammates/forks","keys_url":"https://api.github.com/repos/sznicci/teammates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sznicci/teammates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sznicci/teammates/teams","hooks_url":"https://api.github.com/repos/sznicci/teammates/hooks","issue_events_url":"https://api.github.com/repos/sznicci/teammates/issues/events{/number}","events_url":"https://api.github.com/repos/sznicci/teammates/events","assignees_url":"https://api.github.com/repos/sznicci/teammates/assignees{/user}","branches_url":"https://api.github.com/repos/sznicci/teammates/branches{/branch}","tags_url":"https://api.github.com/repos/sznicci/teammates/tags","blobs_url":"https://api.github.com/repos/sznicci/teammates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sznicci/teammates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sznicci/teammates/git/refs{/sha}","trees_url":"https://api.github.com/repos/sznicci/teammates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sznicci/teammates/statuses/{sha}","languages_url":"https://api.github.com/repos/sznicci/teammates/languages","stargazers_url":"https://api.github.com/repos/sznicci/teammates/stargazers","contributors_url":"https://api.github.com/repos/sznicci/teammates/contributors","subscribers_url":"https://api.github.com/repos/sznicci/teammates/subscribers","subscription_url":"https://api.github.com/repos/sznicci/teammates/subscription","commits_url":"https://api.github.com/repos/sznicci/teammates/commits{/sha}","git_commits_url":"https://api.github.com/repos/sznicci/teammates/git/commits{/sha}","comments_url":"https://api.github.com/repos/sznicci/teammates/comments{/number}","issue_comment_url":"https://api.github.com/repos/sznicci/teammates/issues/comments{/number}","contents_url":"https://api.github.com/repos/sznicci/teammates/contents/{+path}","compare_url":"https://api.github.com/repos/sznicci/teammates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sznicci/teammates/merges","archive_url":"https://api.github.com/repos/sznicci/teammates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sznicci/teammates/downloads","issues_url":"https://api.github.com/repos/sznicci/teammates/issues{/number}","pulls_url":"https://api.github.com/repos/sznicci/teammates/pulls{/number}","milestones_url":"https://api.github.com/repos/sznicci/teammates/milestones{/number}","notifications_url":"https://api.github.com/repos/sznicci/teammates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sznicci/teammates/labels{/name}","releases_url":"https://api.github.com/repos/sznicci/teammates/releases{/id}","deployments_url":"https://api.github.com/repos/sznicci/teammates/deployments","created_at":"2016-10-12T13:22:56Z","updated_at":"2016-10-12T13:23:06Z","pushed_at":"2016-12-16T02:23:12Z","git_url":"git://github.com/sznicci/teammates.git","ssh_url":"git@github.com:sznicci/teammates.git","clone_url":"https://github.com/sznicci/teammates.git","svn_url":"https://github.com/sznicci/teammates","homepage":"http://teammatesv4.appspot.com/","size":173340,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"TEAMMATES:master","ref":"master","sha":"255ea3df2d1279bb02a70560b41bc3f51a89ae2a","user":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"repo":{"id":19369035,"name":"teammates","full_name":"TEAMMATES/teammates","owner":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TEAMMATES/teammates","description":"This is the project website for the TEAMMATES feedback management tool for education","fork":false,"url":"https://api.github.com/repos/TEAMMATES/teammates","forks_url":"https://api.github.com/repos/TEAMMATES/teammates/forks","keys_url":"https://api.github.com/repos/TEAMMATES/teammates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/teammates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/teammates/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/teammates/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/teammates/events","assignees_url":"https://api.github.com/repos/TEAMMATES/teammates/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/teammates/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/teammates/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/teammates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/teammates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/teammates/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/teammates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/teammates/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/teammates/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/teammates/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/teammates/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/teammates/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/teammates/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/teammates/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/teammates/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/teammates/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/comments{/number}","contents_url":"https://api.github.com/repos/TEAMMATES/teammates/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/teammates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/teammates/merges","archive_url":"https://api.github.com/repos/TEAMMATES/teammates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/teammates/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/teammates/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/teammates/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/teammates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/teammates/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/teammates/releases{/id}","deployments_url":"https://api.github.com/repos/TEAMMATES/teammates/deployments","created_at":"2014-05-02T07:43:00Z","updated_at":"2016-12-16T19:38:40Z","pushed_at":"2016-12-17T14:57:39Z","git_url":"git://github.com/TEAMMATES/teammates.git","ssh_url":"git@github.com:TEAMMATES/teammates.git","clone_url":"https://github.com/TEAMMATES/teammates.git","svn_url":"https://github.com/TEAMMATES/teammates","homepage":"http://teammatesv4.appspot.com/","size":173225,"stargazers_count":186,"watchers_count":186,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":425,"mirror_url":null,"open_issues_count":465,"forks":425,"open_issues":465,"watchers":186,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6207"},"html":{"href":"https://github.com/TEAMMATES/teammates/pull/6207"},"issue":{"href":"https://api.github.com/repos/TEAMMATES/teammates/issues/6207"},"comments":{"href":"https://api.github.com/repos/TEAMMATES/teammates/issues/6207/comments"},"review_comments":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6207/comments"},"review_comment":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6207/commits"},"statuses":{"href":"https://api.github.com/repos/TEAMMATES/teammates/statuses/2a17d4a00c28f097c10813484beffa01473eec00"}}}}
{"actor":{"display_login":"wkurniawan07"}}