{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/108045197","pull_request_review_id":29056069,"id":108045197,"diff_hunk":"@@ -22,24 +22,48 @@ oppia.directive('sharingLinks', [function() {\n     scope: {\n       layoutType: '@',\n       layoutAlignType: '@',\n+      shareType: '@',\n       getTwitterText: '&twitterText',\n-      getExplorationId: '&explorationId'\n+      getExplorationId: '&explorationId',\n+      getCollectionId: '&collectionId'\n     },\n     templateUrl: 'components/sharingLinks',\n     controller: [\n-      '$scope', '$window', 'oppiaHtmlEscaper', 'ExplorationEmbedButtonService',\n+      '$scope', '$window', '$injector', 'oppiaHtmlEscaper',\n       'siteAnalyticsService', 'UrlInterpolationService',\n       function(\n-          $scope, $window, oppiaHtmlEscaper, ExplorationEmbedButtonService,\n+          $scope, $window, $injector, oppiaHtmlEscaper,\n           siteAnalyticsService, UrlInterpolationService) {\n-        $scope.explorationId = $scope.getExplorationId();\n+        $scope.registerShareEvent = null;\n \n-        $scope.registerShareExplorationEvent = function(network) {\n-          siteAnalyticsService.registerShareExplorationEvent(network);\n-        };\n+        if ($scope.shareType === 'exploration') {\n+          $scope.explorationId = $scope.getExplorationId();\n+          var ExplorationEmbedButtonService = $injector.get(\n+            'ExplorationEmbedButtonService');\n \n-        $scope.showEmbedExplorationModal = (\n-          ExplorationEmbedButtonService.showModal);\n+          $scope.activityType = 'explore';\n+          $scope.activityId = $scope.explorationId;\n+\n+          $scope.registerShareEvent = function(network) {\n+            siteAnalyticsService.registerShareExplorationEvent(network);\n+          };\n+\n+          $scope.showEmbedExplorationModal = (\n+            ExplorationEmbedButtonService.showModal);\n+        } else if ($scope.shareType === 'collection') {\n+          $scope.collectionId = $scope.getCollectionId();\n+\n+          $scope.activityType = 'collection';\n+          $scope.activityId = $scope.collectionId;\n+\n+          $scope.registerShareEvent = function(network) {\n+            siteAnalyticsService.registerShareCollectionEvent(network);\n+          };\n+        } else {\n+          throw (","path":"core/templates/dev/head/components/share/SharingLinksDirective.js","position":null,"original_position":51,"commit_id":"9a90c2a5cb9be7f98b0742125958dc6333f58b46","original_commit_id":"778b293ce0a614631e453f7513e265f0d901488d","user":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars3.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":"That's a good question. I think either is fine, see [here](http://stackoverflow.com/questions/13294658/throw-errormsg-vs-throw-new-errormsg).","created_at":"2017-03-25T21:04:30Z","updated_at":"2017-03-25T21:04:30Z","html_url":"https://github.com/oppia/oppia/pull/3216#discussion_r108045197","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/3216","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/108045197"},"html":{"href":"https://github.com/oppia/oppia/pull/3216#discussion_r108045197"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/3216"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/3216","id":111406409,"html_url":"https://github.com/oppia/oppia/pull/3216","diff_url":"https://github.com/oppia/oppia/pull/3216.diff","patch_url":"https://github.com/oppia/oppia/pull/3216.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/3216","number":3216,"state":"open","locked":false,"title":"Fix #3131: collection footer and sharing directive added to collection player","user":{"login":"1995YogeshSharma","id":9693472,"avatar_url":"https://avatars1.githubusercontent.com/u/9693472?v=3","gravatar_id":"","url":"https://api.github.com/users/1995YogeshSharma","html_url":"https://github.com/1995YogeshSharma","followers_url":"https://api.github.com/users/1995YogeshSharma/followers","following_url":"https://api.github.com/users/1995YogeshSharma/following{/other_user}","gists_url":"https://api.github.com/users/1995YogeshSharma/gists{/gist_id}","starred_url":"https://api.github.com/users/1995YogeshSharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1995YogeshSharma/subscriptions","organizations_url":"https://api.github.com/users/1995YogeshSharma/orgs","repos_url":"https://api.github.com/users/1995YogeshSharma/repos","events_url":"https://api.github.com/users/1995YogeshSharma/events{/privacy}","received_events_url":"https://api.github.com/users/1995YogeshSharma/received_events","type":"User","site_admin":false},"body":"this is in regard of #3131 \r\n\r\nhere, I have solved the issue by making changes in the existing sharingLink component instead of creating a separate one for the collection player as did in #3160 .","created_at":"2017-03-18T11:03:02Z","updated_at":"2017-03-25T21:04:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a2eaab34c85ab07e770d7aeced4bdd2bb3ae437","assignee":{"login":"1995YogeshSharma","id":9693472,"avatar_url":"https://avatars1.githubusercontent.com/u/9693472?v=3","gravatar_id":"","url":"https://api.github.com/users/1995YogeshSharma","html_url":"https://github.com/1995YogeshSharma","followers_url":"https://api.github.com/users/1995YogeshSharma/followers","following_url":"https://api.github.com/users/1995YogeshSharma/following{/other_user}","gists_url":"https://api.github.com/users/1995YogeshSharma/gists{/gist_id}","starred_url":"https://api.github.com/users/1995YogeshSharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1995YogeshSharma/subscriptions","organizations_url":"https://api.github.com/users/1995YogeshSharma/orgs","repos_url":"https://api.github.com/users/1995YogeshSharma/repos","events_url":"https://api.github.com/users/1995YogeshSharma/events{/privacy}","received_events_url":"https://api.github.com/users/1995YogeshSharma/received_events","type":"User","site_admin":false},"assignees":[{"login":"1995YogeshSharma","id":9693472,"avatar_url":"https://avatars1.githubusercontent.com/u/9693472?v=3","gravatar_id":"","url":"https://api.github.com/users/1995YogeshSharma","html_url":"https://github.com/1995YogeshSharma","followers_url":"https://api.github.com/users/1995YogeshSharma/followers","following_url":"https://api.github.com/users/1995YogeshSharma/following{/other_user}","gists_url":"https://api.github.com/users/1995YogeshSharma/gists{/gist_id}","starred_url":"https://api.github.com/users/1995YogeshSharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1995YogeshSharma/subscriptions","organizations_url":"https://api.github.com/users/1995YogeshSharma/orgs","repos_url":"https://api.github.com/users/1995YogeshSharma/repos","events_url":"https://api.github.com/users/1995YogeshSharma/events{/privacy}","received_events_url":"https://api.github.com/users/1995YogeshSharma/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/3216/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/3216/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/3216/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/9a90c2a5cb9be7f98b0742125958dc6333f58b46","head":{"label":"1995YogeshSharma:issue-3131-alternate","ref":"issue-3131-alternate","sha":"9a90c2a5cb9be7f98b0742125958dc6333f58b46","user":{"login":"1995YogeshSharma","id":9693472,"avatar_url":"https://avatars1.githubusercontent.com/u/9693472?v=3","gravatar_id":"","url":"https://api.github.com/users/1995YogeshSharma","html_url":"https://github.com/1995YogeshSharma","followers_url":"https://api.github.com/users/1995YogeshSharma/followers","following_url":"https://api.github.com/users/1995YogeshSharma/following{/other_user}","gists_url":"https://api.github.com/users/1995YogeshSharma/gists{/gist_id}","starred_url":"https://api.github.com/users/1995YogeshSharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1995YogeshSharma/subscriptions","organizations_url":"https://api.github.com/users/1995YogeshSharma/orgs","repos_url":"https://api.github.com/users/1995YogeshSharma/repos","events_url":"https://api.github.com/users/1995YogeshSharma/events{/privacy}","received_events_url":"https://api.github.com/users/1995YogeshSharma/received_events","type":"User","site_admin":false},"repo":{"id":81466647,"name":"oppia","full_name":"1995YogeshSharma/oppia","owner":{"login":"1995YogeshSharma","id":9693472,"avatar_url":"https://avatars1.githubusercontent.com/u/9693472?v=3","gravatar_id":"","url":"https://api.github.com/users/1995YogeshSharma","html_url":"https://github.com/1995YogeshSharma","followers_url":"https://api.github.com/users/1995YogeshSharma/followers","following_url":"https://api.github.com/users/1995YogeshSharma/following{/other_user}","gists_url":"https://api.github.com/users/1995YogeshSharma/gists{/gist_id}","starred_url":"https://api.github.com/users/1995YogeshSharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1995YogeshSharma/subscriptions","organizations_url":"https://api.github.com/users/1995YogeshSharma/orgs","repos_url":"https://api.github.com/users/1995YogeshSharma/repos","events_url":"https://api.github.com/users/1995YogeshSharma/events{/privacy}","received_events_url":"https://api.github.com/users/1995YogeshSharma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/1995YogeshSharma/oppia","description":"Tool for collaboratively building interactive lessons.","fork":true,"url":"https://api.github.com/repos/1995YogeshSharma/oppia","forks_url":"https://api.github.com/repos/1995YogeshSharma/oppia/forks","keys_url":"https://api.github.com/repos/1995YogeshSharma/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/1995YogeshSharma/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/1995YogeshSharma/oppia/teams","hooks_url":"https://api.github.com/repos/1995YogeshSharma/oppia/hooks","issue_events_url":"https://api.github.com/repos/1995YogeshSharma/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/1995YogeshSharma/oppia/events","assignees_url":"https://api.github.com/repos/1995YogeshSharma/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/1995YogeshSharma/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/1995YogeshSharma/oppia/tags","blobs_url":"https://api.github.com/repos/1995YogeshSharma/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/1995YogeshSharma/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/1995YogeshSharma/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/1995YogeshSharma/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/1995YogeshSharma/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/1995YogeshSharma/oppia/languages","stargazers_url":"https://api.github.com/repos/1995YogeshSharma/oppia/stargazers","contributors_url":"https://api.github.com/repos/1995YogeshSharma/oppia/contributors","subscribers_url":"https://api.github.com/repos/1995YogeshSharma/oppia/subscribers","subscription_url":"https://api.github.com/repos/1995YogeshSharma/oppia/subscription","commits_url":"https://api.github.com/repos/1995YogeshSharma/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/1995YogeshSharma/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/1995YogeshSharma/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/1995YogeshSharma/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/1995YogeshSharma/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/1995YogeshSharma/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/1995YogeshSharma/oppia/merges","archive_url":"https://api.github.com/repos/1995YogeshSharma/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/1995YogeshSharma/oppia/downloads","issues_url":"https://api.github.com/repos/1995YogeshSharma/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/1995YogeshSharma/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/1995YogeshSharma/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/1995YogeshSharma/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/1995YogeshSharma/oppia/labels{/name}","releases_url":"https://api.github.com/repos/1995YogeshSharma/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/1995YogeshSharma/oppia/deployments","created_at":"2017-02-09T15:50:27Z","updated_at":"2017-02-09T15:50:32Z","pushed_at":"2017-03-25T06:55:43Z","git_url":"git://github.com/1995YogeshSharma/oppia.git","ssh_url":"git@github.com:1995YogeshSharma/oppia.git","clone_url":"https://github.com/1995YogeshSharma/oppia.git","svn_url":"https://github.com/1995YogeshSharma/oppia","homepage":"https://www.oppia.org","size":50189,"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":"b53b0fe49c5e8637a11123a9ee07cd139f6ae978","user":{"login":"oppia","id":11620230,"avatar_url":"https://avatars2.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://avatars2.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":"2017-03-23T18:51:18Z","pushed_at":"2017-03-25T20:33:33Z","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":50281,"stargazers_count":242,"watchers_count":242,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":388,"mirror_url":null,"open_issues_count":351,"forks":388,"open_issues":351,"watchers":242,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/3216"},"html":{"href":"https://github.com/oppia/oppia/pull/3216"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/3216"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/3216/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/3216/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/3216/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/9a90c2a5cb9be7f98b0742125958dc6333f58b46"}}}}
{"actor":{"display_login":"seanlip"}}