{"action":"created","comment":{"url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments/55132513","id":55132513,"diff_hunk":"@@ -15,39 +15,40 @@\n \n     @Override\n     protected ActionResult execute() throws EntityDoesNotExistException {\n-        \n         new GateKeeper().verifyAdminPrivileges(account);\n         \n-        @SuppressWarnings(\"deprecation\") //This method is deprecated to prevent unintended usage. This is an intended usage.\n-        List<InstructorAttributes> allInstructorsList = logic.getAllInstructors();\n-        @SuppressWarnings(\"deprecation\") //This method is deprecated to prevent unintended usage. This is an intended usage.\n-        List<AccountAttributes> allInstructorAccountsList = logic.getInstructorAccounts();\n-        \n-        boolean isToShowAll = this.getRequestParamAsBoolean(\"all\");\n+        String instructorGoogleId = this.getRequestParamValue(\"googleId\");\n         \n         Map<String, ArrayList<InstructorAttributes>> instructorCoursesTable = new HashMap<String, ArrayList<InstructorAttributes>>();\n         Map<String, AccountAttributes> instructorAccountsTable = new HashMap<String, AccountAttributes>();\n         \n-        for(AccountAttributes acc : allInstructorAccountsList){\n-            instructorAccountsTable.put(acc.googleId, acc);\n+        if (instructorGoogleId == null) {\n+            instructorGoogleId = \"\";\n         }\n+        List<InstructorAttributes> instructorsList = logic.getInstructorsForGoogleId(instructorGoogleId);\n+        AccountAttributes instructorAccount = logic.getAccount(instructorGoogleId);\n         \n-        for(InstructorAttributes instructor : allInstructorsList){\n-            ArrayList<InstructorAttributes> courseList = instructorCoursesTable.get(instructor.googleId);\n-            if (courseList == null){\n-                courseList = new ArrayList<InstructorAttributes>();\n-                instructorCoursesTable.put(instructor.googleId, courseList);\n-            }\n+        boolean isToShowAll = this.getRequestParamAsBoolean(\"all\");\n+        boolean isAccountExisting = instructorAccount != null && !instructorsList.isEmpty();\n+        if (isAccountExisting) {\n+            instructorAccountsTable.put(instructorAccount.googleId, instructorAccount);\n             \n-            courseList.add(instructor);\n+            for(InstructorAttributes instructor : instructorsList){","path":"src/main/java/teammates/ui/controller/AdminAccountManagementPageAction.java","position":38,"original_position":38,"commit_id":"6a781622142c94bbcf40e21bc7a5503aae305132","original_commit_id":"6a781622142c94bbcf40e21bc7a5503aae305132","user":{"login":"kanghj","id":2216119,"avatar_url":"https://avatars.githubusercontent.com/u/2216119?v=3","gravatar_id":"","url":"https://api.github.com/users/kanghj","html_url":"https://github.com/kanghj","followers_url":"https://api.github.com/users/kanghj/followers","following_url":"https://api.github.com/users/kanghj/following{/other_user}","gists_url":"https://api.github.com/users/kanghj/gists{/gist_id}","starred_url":"https://api.github.com/users/kanghj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanghj/subscriptions","organizations_url":"https://api.github.com/users/kanghj/orgs","repos_url":"https://api.github.com/users/kanghj/repos","events_url":"https://api.github.com/users/kanghj/events{/privacy}","received_events_url":"https://api.github.com/users/kanghj/received_events","type":"User","site_admin":false},"body":"@bamboo3250, let's fix the whitespace here","created_at":"2016-03-06T03:23:37Z","updated_at":"2016-03-06T03:23:37Z","html_url":"https://github.com/TEAMMATES/teammates/pull/4907#discussion_r55132513","pull_request_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/4907","_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments/55132513"},"html":{"href":"https://github.com/TEAMMATES/teammates/pull/4907#discussion_r55132513"},"pull_request":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/4907"}}},"pull_request":{"url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/4907","id":61823782,"html_url":"https://github.com/TEAMMATES/teammates/pull/4907","diff_url":"https://github.com/TEAMMATES/teammates/pull/4907.diff","patch_url":"https://github.com/TEAMMATES/teammates/pull/4907.patch","issue_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/4907","number":4907,"state":"open","locked":false,"title":"admin accounts management page is not scalable #4837","user":{"login":"bamboo3250","id":8078323,"avatar_url":"https://avatars.githubusercontent.com/u/8078323?v=3","gravatar_id":"","url":"https://api.github.com/users/bamboo3250","html_url":"https://github.com/bamboo3250","followers_url":"https://api.github.com/users/bamboo3250/followers","following_url":"https://api.github.com/users/bamboo3250/following{/other_user}","gists_url":"https://api.github.com/users/bamboo3250/gists{/gist_id}","starred_url":"https://api.github.com/users/bamboo3250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bamboo3250/subscriptions","organizations_url":"https://api.github.com/users/bamboo3250/orgs","repos_url":"https://api.github.com/users/bamboo3250/repos","events_url":"https://api.github.com/users/bamboo3250/events{/privacy}","received_events_url":"https://api.github.com/users/bamboo3250/received_events","type":"User","site_admin":false},"body":"Fixes #4837\r\n\r\nAs discussed on Wednesday, I temporarily removed Account Management Page from navbar and added an URL to redirect from Search Page to Account Management Page for each registered instructor.\r\n\r\n![screenshot 2016-03-06 04 45 24](https://cloud.githubusercontent.com/assets/8078323/13550341/794566dc-e356-11e5-8a3c-6654817850de.png)\r\n\r\nI also disabled unit test for Account Management Page since we have to renovate it sooner or later anyway. ","created_at":"2016-03-05T20:55:04Z","updated_at":"2016-03-06T03:23:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1be675cee45d058ae511c6a484596777395dede4","assignee":{"login":"kanghj","id":2216119,"avatar_url":"https://avatars.githubusercontent.com/u/2216119?v=3","gravatar_id":"","url":"https://api.github.com/users/kanghj","html_url":"https://github.com/kanghj","followers_url":"https://api.github.com/users/kanghj/followers","following_url":"https://api.github.com/users/kanghj/following{/other_user}","gists_url":"https://api.github.com/users/kanghj/gists{/gist_id}","starred_url":"https://api.github.com/users/kanghj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanghj/subscriptions","organizations_url":"https://api.github.com/users/kanghj/orgs","repos_url":"https://api.github.com/users/kanghj/repos","events_url":"https://api.github.com/users/kanghj/events{/privacy}","received_events_url":"https://api.github.com/users/kanghj/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/4907/commits","review_comments_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/4907/comments","review_comment_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/4907/comments","statuses_url":"https://api.github.com/repos/TEAMMATES/teammates/statuses/6a781622142c94bbcf40e21bc7a5503aae305132","head":{"label":"TEAMMATES:4837-admin-accounts-management-not-scalable","ref":"4837-admin-accounts-management-not-scalable","sha":"6a781622142c94bbcf40e21bc7a5503aae305132","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-03-05T06:02:30Z","pushed_at":"2016-03-06T00:35:34Z","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":144089,"stargazers_count":68,"watchers_count":68,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":183,"mirror_url":null,"open_issues_count":510,"forks":183,"open_issues":510,"watchers":68,"default_branch":"master"}},"base":{"label":"TEAMMATES:master","ref":"master","sha":"0479e4a107d2d9a7c033771877df2fc8683eef72","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-03-05T06:02:30Z","pushed_at":"2016-03-06T00:35:34Z","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":144089,"stargazers_count":68,"watchers_count":68,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":183,"mirror_url":null,"open_issues_count":510,"forks":183,"open_issues":510,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/4907"},"html":{"href":"https://github.com/TEAMMATES/teammates/pull/4907"},"issue":{"href":"https://api.github.com/repos/TEAMMATES/teammates/issues/4907"},"comments":{"href":"https://api.github.com/repos/TEAMMATES/teammates/issues/4907/comments"},"review_comments":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/4907/comments"},"review_comment":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/4907/commits"},"statuses":{"href":"https://api.github.com/repos/TEAMMATES/teammates/statuses/6a781622142c94bbcf40e21bc7a5503aae305132"}}}}