{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/85617753","pull_request_review_id":6325438,"id":85617753,"diff_hunk":"@@ -0,0 +1,81 @@\n+// Copyright 2016 The Oppia Authors. All Rights Reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//      http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS-IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+/**\n+ * @fileoverview Controller for oppia email dashboard page.\n+ */\n+\n+oppia.controller('EmailDashboard', [\n+  '$scope', '$http', 'EmailDashboardDataService',\n+  function($scope, $http, EmailDashboardDataService) {\n+    $scope.currentPageOfQueries = [];\n+\n+    var updateCurrentPageOfQueries = function(queries) {\n+      $scope.currentPageOfQueries = queries;\n+    };\n+\n+    var setQueryStatus = function(index, query) {\n+      $scope.currentPageOfQueries[index] = query;\n+    };\n+\n+    $scope.resetForm = function() {\n+      $scope.has_not_logged_in_for_n_days = null;\n+      $scope.inactive_in_last_n_days = null;\n+      $scope.created_at_least_n_exps = null;\n+      $scope.created_fewer_than_n_exps = null;\n+      $scope.edited_at_least_n_exps = null;\n+      $scope.edited_fewer_than_n_exps = null;\n+    };\n+\n+    $scope.submitQuery = function() {\n+      var data = {\n+        has_not_logged_in_for_n_days: $scope.has_not_logged_in_for_n_days,\n+        inactive_in_last_n_days: $scope.inactive_in_last_n_days,\n+        created_at_least_n_exps: $scope.created_at_least_n_exps,\n+        created_fewer_than_n_exps: $scope.created_fewer_than_n_exps,\n+        edited_at_least_n_exps: $scope.edited_at_least_n_exps,\n+        edited_fewer_than_n_exps: $scope.edited_fewer_than_n_exps\n+      };\n+      EmailDashboardDataService.submitQuery(data, updateCurrentPageOfQueries);\n+      $scope.resetForm();\n+      $scope.showSuccessMessage = true;\n+    };\n+\n+    $scope.getNextPageOfQueries = function() {\n+      if (EmailDashboardDataService.isNextPageAvailable()) {\n+        EmailDashboardDataService.getNextQueries(updateCurrentPageOfQueries);","path":"core/templates/dev/head/pages/email_dashboard/EmailDashboard.js","position":57,"original_position":57,"commit_id":"7d2b029bb6a7d6550047dea45ebcb7fb31d69e7f","original_commit_id":"7d2b029bb6a7d6550047dea45ebcb7fb31d69e7f","user":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"body":"Can you do this as a promise, instead?\r\n```\r\nEmailDashboardDataService.getNextQueries().then(updateCurrentPageOfQueries);\r\n```\r\nor\r\n```\r\nEmailDashboardDataService.getNextQueries().then(function(queries) {\r\n  updateCurrentPageOfQueries(queries);\r\n});\r\n```\r\n\r\nI think it reads better that way. Ditto below.","created_at":"2016-10-28T22:01:54Z","updated_at":"2016-10-28T22:50:53Z","html_url":"https://github.com/oppia/oppia/pull/2628#discussion_r85617753","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/2628","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/85617753"},"html":{"href":"https://github.com/oppia/oppia/pull/2628#discussion_r85617753"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2628"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/2628","id":90330982,"html_url":"https://github.com/oppia/oppia/pull/2628","diff_url":"https://github.com/oppia/oppia/pull/2628.diff","patch_url":"https://github.com/oppia/oppia/pull/2628.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/2628","number":2628,"state":"open","locked":false,"title":"Fix part of #2269: Add query fronted page and handlers.","user":{"login":"prasanna08","id":8678373,"avatar_url":"https://avatars.githubusercontent.com/u/8678373?v=3","gravatar_id":"","url":"https://api.github.com/users/prasanna08","html_url":"https://github.com/prasanna08","followers_url":"https://api.github.com/users/prasanna08/followers","following_url":"https://api.github.com/users/prasanna08/following{/other_user}","gists_url":"https://api.github.com/users/prasanna08/gists{/gist_id}","starred_url":"https://api.github.com/users/prasanna08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prasanna08/subscriptions","organizations_url":"https://api.github.com/users/prasanna08/orgs","repos_url":"https://api.github.com/users/prasanna08/repos","events_url":"https://api.github.com/users/prasanna08/events{/privacy}","received_events_url":"https://api.github.com/users/prasanna08/received_events","type":"User","site_admin":false},"body":"Added front-end page for submitting query and viewing result of past queries.\r\nAdded handlers for query data in back-end.","created_at":"2016-10-21T06:49:45Z","updated_at":"2016-10-28T22:50:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de7792d6f1f5698ef4bb79692f2f1383d048e951","assignee":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"assignees":[{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/2628/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/2628/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/2628/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/7d2b029bb6a7d6550047dea45ebcb7fb31d69e7f","head":{"label":"prasanna08:query_frontend","ref":"query_frontend","sha":"7d2b029bb6a7d6550047dea45ebcb7fb31d69e7f","user":{"login":"prasanna08","id":8678373,"avatar_url":"https://avatars.githubusercontent.com/u/8678373?v=3","gravatar_id":"","url":"https://api.github.com/users/prasanna08","html_url":"https://github.com/prasanna08","followers_url":"https://api.github.com/users/prasanna08/followers","following_url":"https://api.github.com/users/prasanna08/following{/other_user}","gists_url":"https://api.github.com/users/prasanna08/gists{/gist_id}","starred_url":"https://api.github.com/users/prasanna08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prasanna08/subscriptions","organizations_url":"https://api.github.com/users/prasanna08/orgs","repos_url":"https://api.github.com/users/prasanna08/repos","events_url":"https://api.github.com/users/prasanna08/events{/privacy}","received_events_url":"https://api.github.com/users/prasanna08/received_events","type":"User","site_admin":false},"repo":{"id":49757386,"name":"oppia","full_name":"prasanna08/oppia","owner":{"login":"prasanna08","id":8678373,"avatar_url":"https://avatars.githubusercontent.com/u/8678373?v=3","gravatar_id":"","url":"https://api.github.com/users/prasanna08","html_url":"https://github.com/prasanna08","followers_url":"https://api.github.com/users/prasanna08/followers","following_url":"https://api.github.com/users/prasanna08/following{/other_user}","gists_url":"https://api.github.com/users/prasanna08/gists{/gist_id}","starred_url":"https://api.github.com/users/prasanna08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prasanna08/subscriptions","organizations_url":"https://api.github.com/users/prasanna08/orgs","repos_url":"https://api.github.com/users/prasanna08/repos","events_url":"https://api.github.com/users/prasanna08/events{/privacy}","received_events_url":"https://api.github.com/users/prasanna08/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prasanna08/oppia","description":"Tool for collaboratively building intelligent tutors.","fork":true,"url":"https://api.github.com/repos/prasanna08/oppia","forks_url":"https://api.github.com/repos/prasanna08/oppia/forks","keys_url":"https://api.github.com/repos/prasanna08/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prasanna08/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prasanna08/oppia/teams","hooks_url":"https://api.github.com/repos/prasanna08/oppia/hooks","issue_events_url":"https://api.github.com/repos/prasanna08/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/prasanna08/oppia/events","assignees_url":"https://api.github.com/repos/prasanna08/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/prasanna08/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/prasanna08/oppia/tags","blobs_url":"https://api.github.com/repos/prasanna08/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prasanna08/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prasanna08/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/prasanna08/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prasanna08/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/prasanna08/oppia/languages","stargazers_url":"https://api.github.com/repos/prasanna08/oppia/stargazers","contributors_url":"https://api.github.com/repos/prasanna08/oppia/contributors","subscribers_url":"https://api.github.com/repos/prasanna08/oppia/subscribers","subscription_url":"https://api.github.com/repos/prasanna08/oppia/subscription","commits_url":"https://api.github.com/repos/prasanna08/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/prasanna08/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/prasanna08/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/prasanna08/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/prasanna08/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/prasanna08/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prasanna08/oppia/merges","archive_url":"https://api.github.com/repos/prasanna08/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prasanna08/oppia/downloads","issues_url":"https://api.github.com/repos/prasanna08/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/prasanna08/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/prasanna08/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/prasanna08/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prasanna08/oppia/labels{/name}","releases_url":"https://api.github.com/repos/prasanna08/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/prasanna08/oppia/deployments","created_at":"2016-01-16T03:21:22Z","updated_at":"2016-01-16T03:21:24Z","pushed_at":"2016-10-28T18:39:30Z","git_url":"git://github.com/prasanna08/oppia.git","ssh_url":"git@github.com:prasanna08/oppia.git","clone_url":"https://github.com/prasanna08/oppia.git","svn_url":"https://github.com/prasanna08/oppia","homepage":"https://www.oppia.org","size":47587,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"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":"develop"}},"base":{"label":"oppia:develop","ref":"develop","sha":"e6b71391639cb0f895654077b75158223c43c12a","user":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"repo":{"id":40687563,"name":"oppia","full_name":"oppia/oppia","owner":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oppia/oppia","description":"Tool for collaboratively building interactive lessons.","fork":false,"url":"https://api.github.com/repos/oppia/oppia","forks_url":"https://api.github.com/repos/oppia/oppia/forks","keys_url":"https://api.github.com/repos/oppia/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppia/teams","hooks_url":"https://api.github.com/repos/oppia/oppia/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppia/events","assignees_url":"https://api.github.com/repos/oppia/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppia/tags","blobs_url":"https://api.github.com/repos/oppia/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppia/languages","stargazers_url":"https://api.github.com/repos/oppia/oppia/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppia/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppia/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppia/subscription","commits_url":"https://api.github.com/repos/oppia/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppia/merges","archive_url":"https://api.github.com/repos/oppia/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppia/downloads","issues_url":"https://api.github.com/repos/oppia/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppia/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/oppia/oppia/deployments","created_at":"2015-08-14T00:16:14Z","updated_at":"2016-10-24T10:16:22Z","pushed_at":"2016-10-28T19:33:10Z","git_url":"git://github.com/oppia/oppia.git","ssh_url":"git@github.com:oppia/oppia.git","clone_url":"https://github.com/oppia/oppia.git","svn_url":"https://github.com/oppia/oppia","homepage":"https://www.oppia.org","size":90756,"stargazers_count":181,"watchers_count":181,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":272,"mirror_url":null,"open_issues_count":343,"forks":272,"open_issues":343,"watchers":181,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2628"},"html":{"href":"https://github.com/oppia/oppia/pull/2628"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/2628"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/2628/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2628/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2628/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/7d2b029bb6a7d6550047dea45ebcb7fb31d69e7f"}}}}
{"actor":{"display_login":"seanlip"}}