{"action":"created","comment":{"url":"https://api.github.com/repos/openstax/exchange/pulls/comments/23258789","id":23258789,"diff_hunk":"@@ -5,8 +5,17 @@ class GradingEventRepresenter < EventRepresenter\n              type: String,\n              readable: true,\n              writeable: true,\n+             getter: lambda { |args|\n+               next grader unless args[:activity]\n+\n+               # If an identifier is submitted as a grader,\n+               # convert it to a research_label for researchers\n+               Doorkeeper::AccessToken.find_by(token: grader)\n+                                      .try(:resource_owner)\n+                                      .try(:research_label) || grader\n+             },\n              schema_info: {\n-               description: 'Who graded this Task'\n+               description: 'The person grading this Task'","path":"app/representers/api/v1/grading_event_representer.rb","position":15,"original_position":15,"commit_id":"6a7b43cbb806a097d0046f44aec681548851743c","original_commit_id":"6a7b43cbb806a097d0046f44aec681548851743c","user":{"login":"Dantemss","id":1017808,"avatar_url":"https://avatars.githubusercontent.com/u/1017808?v=3","gravatar_id":"","url":"https://api.github.com/users/Dantemss","html_url":"https://github.com/Dantemss","followers_url":"https://api.github.com/users/Dantemss/followers","following_url":"https://api.github.com/users/Dantemss/following{/other_user}","gists_url":"https://api.github.com/users/Dantemss/gists{/gist_id}","starred_url":"https://api.github.com/users/Dantemss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dantemss/subscriptions","organizations_url":"https://api.github.com/users/Dantemss/orgs","repos_url":"https://api.github.com/users/Dantemss/repos","events_url":"https://api.github.com/users/Dantemss/events{/privacy}","received_events_url":"https://api.github.com/users/Dantemss/received_events","type":"User","site_admin":false},"body":"True. I allow graders to be any string. I should change this description.","created_at":"2015-01-20T21:45:57Z","updated_at":"2015-01-20T21:45:57Z","html_url":"https://github.com/openstax/exchange/pull/21#discussion_r23258789","pull_request_url":"https://api.github.com/repos/openstax/exchange/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/openstax/exchange/pulls/comments/23258789"},"html":{"href":"https://github.com/openstax/exchange/pull/21#discussion_r23258789"},"pull_request":{"href":"https://api.github.com/repos/openstax/exchange/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/openstax/exchange/pulls/21","id":27388166,"html_url":"https://github.com/openstax/exchange/pull/21","diff_url":"https://github.com/openstax/exchange/pull/21.diff","patch_url":"https://github.com/openstax/exchange/pull/21.patch","issue_url":"https://api.github.com/repos/openstax/exchange/issues/21","number":21,"state":"open","locked":false,"title":"ExerciseActivity and Amazon SNS","user":{"login":"Dantemss","id":1017808,"avatar_url":"https://avatars.githubusercontent.com/u/1017808?v=3","gravatar_id":"","url":"https://api.github.com/users/Dantemss","html_url":"https://github.com/Dantemss","followers_url":"https://api.github.com/users/Dantemss/followers","following_url":"https://api.github.com/users/Dantemss/following{/other_user}","gists_url":"https://api.github.com/users/Dantemss/gists{/gist_id}","starred_url":"https://api.github.com/users/Dantemss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dantemss/subscriptions","organizations_url":"https://api.github.com/users/Dantemss/orgs","repos_url":"https://api.github.com/users/Dantemss/repos","events_url":"https://api.github.com/users/Dantemss/events{/privacy}","received_events_url":"https://api.github.com/users/Dantemss/received_events","type":"User","site_admin":false},"body":"Copies the grade from the GradingEvent, but keeps track of the AnswerEvents indirectly.","created_at":"2015-01-14T22:09:55Z","updated_at":"2015-01-20T21:45:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a97c99beae482235b35e8021fe901e1b260ac74","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openstax/exchange/pulls/21/commits","review_comments_url":"https://api.github.com/repos/openstax/exchange/pulls/21/comments","review_comment_url":"https://api.github.com/repos/openstax/exchange/pulls/comments/{number}","comments_url":"https://api.github.com/repos/openstax/exchange/issues/21/comments","statuses_url":"https://api.github.com/repos/openstax/exchange/statuses/6a7b43cbb806a097d0046f44aec681548851743c","head":{"label":"Dantemss:master","ref":"master","sha":"6a7b43cbb806a097d0046f44aec681548851743c","user":{"login":"Dantemss","id":1017808,"avatar_url":"https://avatars.githubusercontent.com/u/1017808?v=3","gravatar_id":"","url":"https://api.github.com/users/Dantemss","html_url":"https://github.com/Dantemss","followers_url":"https://api.github.com/users/Dantemss/followers","following_url":"https://api.github.com/users/Dantemss/following{/other_user}","gists_url":"https://api.github.com/users/Dantemss/gists{/gist_id}","starred_url":"https://api.github.com/users/Dantemss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dantemss/subscriptions","organizations_url":"https://api.github.com/users/Dantemss/orgs","repos_url":"https://api.github.com/users/Dantemss/repos","events_url":"https://api.github.com/users/Dantemss/events{/privacy}","received_events_url":"https://api.github.com/users/Dantemss/received_events","type":"User","site_admin":false},"repo":{"id":20333482,"name":"exchange","full_name":"Dantemss/exchange","owner":{"login":"Dantemss","id":1017808,"avatar_url":"https://avatars.githubusercontent.com/u/1017808?v=3","gravatar_id":"","url":"https://api.github.com/users/Dantemss","html_url":"https://github.com/Dantemss","followers_url":"https://api.github.com/users/Dantemss/followers","following_url":"https://api.github.com/users/Dantemss/following{/other_user}","gists_url":"https://api.github.com/users/Dantemss/gists{/gist_id}","starred_url":"https://api.github.com/users/Dantemss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dantemss/subscriptions","organizations_url":"https://api.github.com/users/Dantemss/orgs","repos_url":"https://api.github.com/users/Dantemss/repos","events_url":"https://api.github.com/users/Dantemss/events{/privacy}","received_events_url":"https://api.github.com/users/Dantemss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Dantemss/exchange","description":"OpenStax Exchange","fork":true,"url":"https://api.github.com/repos/Dantemss/exchange","forks_url":"https://api.github.com/repos/Dantemss/exchange/forks","keys_url":"https://api.github.com/repos/Dantemss/exchange/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dantemss/exchange/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dantemss/exchange/teams","hooks_url":"https://api.github.com/repos/Dantemss/exchange/hooks","issue_events_url":"https://api.github.com/repos/Dantemss/exchange/issues/events{/number}","events_url":"https://api.github.com/repos/Dantemss/exchange/events","assignees_url":"https://api.github.com/repos/Dantemss/exchange/assignees{/user}","branches_url":"https://api.github.com/repos/Dantemss/exchange/branches{/branch}","tags_url":"https://api.github.com/repos/Dantemss/exchange/tags","blobs_url":"https://api.github.com/repos/Dantemss/exchange/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dantemss/exchange/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dantemss/exchange/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dantemss/exchange/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dantemss/exchange/statuses/{sha}","languages_url":"https://api.github.com/repos/Dantemss/exchange/languages","stargazers_url":"https://api.github.com/repos/Dantemss/exchange/stargazers","contributors_url":"https://api.github.com/repos/Dantemss/exchange/contributors","subscribers_url":"https://api.github.com/repos/Dantemss/exchange/subscribers","subscription_url":"https://api.github.com/repos/Dantemss/exchange/subscription","commits_url":"https://api.github.com/repos/Dantemss/exchange/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dantemss/exchange/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dantemss/exchange/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dantemss/exchange/issues/comments/{number}","contents_url":"https://api.github.com/repos/Dantemss/exchange/contents/{+path}","compare_url":"https://api.github.com/repos/Dantemss/exchange/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dantemss/exchange/merges","archive_url":"https://api.github.com/repos/Dantemss/exchange/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dantemss/exchange/downloads","issues_url":"https://api.github.com/repos/Dantemss/exchange/issues{/number}","pulls_url":"https://api.github.com/repos/Dantemss/exchange/pulls{/number}","milestones_url":"https://api.github.com/repos/Dantemss/exchange/milestones{/number}","notifications_url":"https://api.github.com/repos/Dantemss/exchange/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dantemss/exchange/labels{/name}","releases_url":"https://api.github.com/repos/Dantemss/exchange/releases{/id}","created_at":"2014-05-30T15:25:27Z","updated_at":"2015-01-16T22:46:33Z","pushed_at":"2015-01-16T22:46:32Z","git_url":"git://github.com/Dantemss/exchange.git","ssh_url":"git@github.com:Dantemss/exchange.git","clone_url":"https://github.com/Dantemss/exchange.git","svn_url":"https://github.com/Dantemss/exchange","homepage":"","size":1456,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"openstax:master","ref":"master","sha":"b6df6b081c37301865ee534c3a8bfc05c65de606","user":{"login":"openstax","id":3805549,"avatar_url":"https://avatars.githubusercontent.com/u/3805549?v=3","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"repo":{"id":8786559,"name":"exchange","full_name":"openstax/exchange","owner":{"login":"openstax","id":3805549,"avatar_url":"https://avatars.githubusercontent.com/u/3805549?v=3","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openstax/exchange","description":"OpenStax Exchange","fork":false,"url":"https://api.github.com/repos/openstax/exchange","forks_url":"https://api.github.com/repos/openstax/exchange/forks","keys_url":"https://api.github.com/repos/openstax/exchange/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openstax/exchange/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openstax/exchange/teams","hooks_url":"https://api.github.com/repos/openstax/exchange/hooks","issue_events_url":"https://api.github.com/repos/openstax/exchange/issues/events{/number}","events_url":"https://api.github.com/repos/openstax/exchange/events","assignees_url":"https://api.github.com/repos/openstax/exchange/assignees{/user}","branches_url":"https://api.github.com/repos/openstax/exchange/branches{/branch}","tags_url":"https://api.github.com/repos/openstax/exchange/tags","blobs_url":"https://api.github.com/repos/openstax/exchange/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openstax/exchange/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openstax/exchange/git/refs{/sha}","trees_url":"https://api.github.com/repos/openstax/exchange/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openstax/exchange/statuses/{sha}","languages_url":"https://api.github.com/repos/openstax/exchange/languages","stargazers_url":"https://api.github.com/repos/openstax/exchange/stargazers","contributors_url":"https://api.github.com/repos/openstax/exchange/contributors","subscribers_url":"https://api.github.com/repos/openstax/exchange/subscribers","subscription_url":"https://api.github.com/repos/openstax/exchange/subscription","commits_url":"https://api.github.com/repos/openstax/exchange/commits{/sha}","git_commits_url":"https://api.github.com/repos/openstax/exchange/git/commits{/sha}","comments_url":"https://api.github.com/repos/openstax/exchange/comments{/number}","issue_comment_url":"https://api.github.com/repos/openstax/exchange/issues/comments/{number}","contents_url":"https://api.github.com/repos/openstax/exchange/contents/{+path}","compare_url":"https://api.github.com/repos/openstax/exchange/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openstax/exchange/merges","archive_url":"https://api.github.com/repos/openstax/exchange/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openstax/exchange/downloads","issues_url":"https://api.github.com/repos/openstax/exchange/issues{/number}","pulls_url":"https://api.github.com/repos/openstax/exchange/pulls{/number}","milestones_url":"https://api.github.com/repos/openstax/exchange/milestones{/number}","notifications_url":"https://api.github.com/repos/openstax/exchange/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openstax/exchange/labels{/name}","releases_url":"https://api.github.com/repos/openstax/exchange/releases{/id}","created_at":"2013-03-14T22:10:49Z","updated_at":"2015-01-09T22:02:55Z","pushed_at":"2015-01-09T22:02:54Z","git_url":"git://github.com/openstax/exchange.git","ssh_url":"git@github.com:openstax/exchange.git","clone_url":"https://github.com/openstax/exchange.git","svn_url":"https://github.com/openstax/exchange","homepage":"","size":1473,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openstax/exchange/pulls/21"},"html":{"href":"https://github.com/openstax/exchange/pull/21"},"issue":{"href":"https://api.github.com/repos/openstax/exchange/issues/21"},"comments":{"href":"https://api.github.com/repos/openstax/exchange/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/openstax/exchange/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/openstax/exchange/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/openstax/exchange/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/openstax/exchange/statuses/6a7b43cbb806a097d0046f44aec681548851743c"}}}}