{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/79784210","id":79784210,"diff_hunk":"@@ -0,0 +1,80 @@\n+// Copyright 2014 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 Directive for the flag exploration popup.\n+ */\n+oppia.controller('flagExplorationPopup', [\n+  '$scope', '$element', '$http', 'explorationContextService', '$modal',\n+  function(\n+    $scope, $element, $http, explorationContextService, $modal) {\n+    $scope.showFlagExplorationModal = function() {\n+      $modal.open({\n+        templateUrl: 'modals/flagExploration',\n+        backdrop: true,\n+        controller: [\n+        '$scope', '$modalInstance', 'explorationContextService',\n+          function($scope, $modalInstance, explorationContextService) {\n+            var explorationId = (\n+              explorationContextService.getExplorationId());\n+            $scope.other = false;\n+\n+            $scope.triggerOther = function(value) {\n+              if (value === 'other') {\n+                $scope.other = true;\n+                $scope.flagMessage = null;\n+              } else {\n+                $scope.other = false;\n+                $scope.flagMessage = $scope.flag;\n+              }\n+            };\n+\n+            $scope.submitFlag = function() {\n+              if ($scope.flagMessage) {\n+                $modalInstance.close({\n+                  report: $scope.flagMessage,\n+                  exp_id: explorationId\n+                });\n+              }\n+            };\n+\n+            $scope.cancel = function() {\n+              $modalInstance.dismiss('cancel');\n+            };\n+          }\n+        ]\n+      }).result.then(function(result) {\n+        var flagExplorationUrl = (\n+            '/flagexplorationhandler/' + result.exp_id);","path":"core/templates/dev/head/player/FlagExplorationPopup.js","position":59,"original_position":59,"commit_id":"13379ac88656e7d023865e4c9691741ceac69a62","original_commit_id":"13379ac88656e7d023865e4c9691741ceac69a62","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":"Instead of doing this, have the explorationId be declared outside the modal, and pass it into the modal. It's not really something that needs to be calculated within the modal.","created_at":"2016-09-21T08:36:42Z","updated_at":"2016-09-21T08:40:27Z","html_url":"https://github.com/oppia/oppia/pull/2495#discussion_r79784210","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/2495","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/79784210"},"html":{"href":"https://github.com/oppia/oppia/pull/2495#discussion_r79784210"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2495"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/2495","id":86057692,"html_url":"https://github.com/oppia/oppia/pull/2495","diff_url":"https://github.com/oppia/oppia/pull/2495.diff","patch_url":"https://github.com/oppia/oppia/pull/2495.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/2495","number":2495,"state":"open","locked":false,"title":"Fix #897: added flag button to the frontend.","user":{"login":"giritheja","id":8845039,"avatar_url":"https://avatars.githubusercontent.com/u/8845039?v=3","gravatar_id":"","url":"https://api.github.com/users/giritheja","html_url":"https://github.com/giritheja","followers_url":"https://api.github.com/users/giritheja/followers","following_url":"https://api.github.com/users/giritheja/following{/other_user}","gists_url":"https://api.github.com/users/giritheja/gists{/gist_id}","starred_url":"https://api.github.com/users/giritheja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giritheja/subscriptions","organizations_url":"https://api.github.com/users/giritheja/orgs","repos_url":"https://api.github.com/users/giritheja/repos","events_url":"https://api.github.com/users/giritheja/events{/privacy}","received_events_url":"https://api.github.com/users/giritheja/received_events","type":"User","site_admin":false},"body":"Implemented the frontend part of the report-mailer system.","created_at":"2016-09-20T21:14:48Z","updated_at":"2016-09-21T08:40:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f4c0f10e584d61afba7668a7a13e4cc4a950c61","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/2495/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/2495/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/2495/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/13379ac88656e7d023865e4c9691741ceac69a62","head":{"label":"giritheja:flag-button","ref":"flag-button","sha":"13379ac88656e7d023865e4c9691741ceac69a62","user":{"login":"giritheja","id":8845039,"avatar_url":"https://avatars.githubusercontent.com/u/8845039?v=3","gravatar_id":"","url":"https://api.github.com/users/giritheja","html_url":"https://github.com/giritheja","followers_url":"https://api.github.com/users/giritheja/followers","following_url":"https://api.github.com/users/giritheja/following{/other_user}","gists_url":"https://api.github.com/users/giritheja/gists{/gist_id}","starred_url":"https://api.github.com/users/giritheja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giritheja/subscriptions","organizations_url":"https://api.github.com/users/giritheja/orgs","repos_url":"https://api.github.com/users/giritheja/repos","events_url":"https://api.github.com/users/giritheja/events{/privacy}","received_events_url":"https://api.github.com/users/giritheja/received_events","type":"User","site_admin":false},"repo":{"id":53139862,"name":"oppia","full_name":"giritheja/oppia","owner":{"login":"giritheja","id":8845039,"avatar_url":"https://avatars.githubusercontent.com/u/8845039?v=3","gravatar_id":"","url":"https://api.github.com/users/giritheja","html_url":"https://github.com/giritheja","followers_url":"https://api.github.com/users/giritheja/followers","following_url":"https://api.github.com/users/giritheja/following{/other_user}","gists_url":"https://api.github.com/users/giritheja/gists{/gist_id}","starred_url":"https://api.github.com/users/giritheja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giritheja/subscriptions","organizations_url":"https://api.github.com/users/giritheja/orgs","repos_url":"https://api.github.com/users/giritheja/repos","events_url":"https://api.github.com/users/giritheja/events{/privacy}","received_events_url":"https://api.github.com/users/giritheja/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/giritheja/oppia","description":"Tool for collaboratively building intelligent tutors.","fork":true,"url":"https://api.github.com/repos/giritheja/oppia","forks_url":"https://api.github.com/repos/giritheja/oppia/forks","keys_url":"https://api.github.com/repos/giritheja/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giritheja/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giritheja/oppia/teams","hooks_url":"https://api.github.com/repos/giritheja/oppia/hooks","issue_events_url":"https://api.github.com/repos/giritheja/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/giritheja/oppia/events","assignees_url":"https://api.github.com/repos/giritheja/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/giritheja/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/giritheja/oppia/tags","blobs_url":"https://api.github.com/repos/giritheja/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giritheja/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giritheja/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/giritheja/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giritheja/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/giritheja/oppia/languages","stargazers_url":"https://api.github.com/repos/giritheja/oppia/stargazers","contributors_url":"https://api.github.com/repos/giritheja/oppia/contributors","subscribers_url":"https://api.github.com/repos/giritheja/oppia/subscribers","subscription_url":"https://api.github.com/repos/giritheja/oppia/subscription","commits_url":"https://api.github.com/repos/giritheja/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/giritheja/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/giritheja/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/giritheja/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/giritheja/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/giritheja/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giritheja/oppia/merges","archive_url":"https://api.github.com/repos/giritheja/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giritheja/oppia/downloads","issues_url":"https://api.github.com/repos/giritheja/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/giritheja/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/giritheja/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/giritheja/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giritheja/oppia/labels{/name}","releases_url":"https://api.github.com/repos/giritheja/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/giritheja/oppia/deployments","created_at":"2016-03-04T14:14:16Z","updated_at":"2016-03-04T14:14:19Z","pushed_at":"2016-09-21T07:59:12Z","git_url":"git://github.com/giritheja/oppia.git","ssh_url":"git@github.com:giritheja/oppia.git","clone_url":"https://github.com/giritheja/oppia.git","svn_url":"https://github.com/giritheja/oppia","homepage":"https://www.oppia.org","size":47110,"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":"176baa1e1439a1238c2b69cc6e88aeea0fe8e4a6","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-09-13T07:22:21Z","pushed_at":"2016-09-21T07:59:12Z","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":89326,"stargazers_count":161,"watchers_count":161,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":251,"mirror_url":null,"open_issues_count":340,"forks":251,"open_issues":340,"watchers":161,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2495"},"html":{"href":"https://github.com/oppia/oppia/pull/2495"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/2495"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/2495/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2495/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2495/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/13379ac88656e7d023865e4c9691741ceac69a62"}}}}
{"actor":{"display_login":"seanlip"}}