{"action":"created","comment":{"url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/comments/139983958","pull_request_review_id":63992113,"id":139983958,"diff_hunk":"@@ -115,6 +117,17 @@ def download_all\n     end\n   end\n \n+  def download_statistics\n+    authorize!(:manage, @assessment)\n+    submission_ids = @assessment.submissions.by_users(student_ids).pluck(:id)","path":"app/controllers/course/assessment/submission/submissions_controller.rb","position":15,"original_position":15,"commit_id":"52517570f51229fa82ee530b127e0e27b7d1ce8d","original_commit_id":"52517570f51229fa82ee530b127e0e27b7d1ce8d","user":{"login":"weiqingtoh","id":4353853,"avatar_url":"https://avatars2.githubusercontent.com/u/4353853?v=4","gravatar_id":"","url":"https://api.github.com/users/weiqingtoh","html_url":"https://github.com/weiqingtoh","followers_url":"https://api.github.com/users/weiqingtoh/followers","following_url":"https://api.github.com/users/weiqingtoh/following{/other_user}","gists_url":"https://api.github.com/users/weiqingtoh/gists{/gist_id}","starred_url":"https://api.github.com/users/weiqingtoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weiqingtoh/subscriptions","organizations_url":"https://api.github.com/users/weiqingtoh/orgs","repos_url":"https://api.github.com/users/weiqingtoh/repos","events_url":"https://api.github.com/users/weiqingtoh/events{/privacy}","received_events_url":"https://api.github.com/users/weiqingtoh/received_events","type":"User","site_admin":false},"body":"How do we want to handle this if `submission_ids` is `nil`? ","created_at":"2017-09-20T14:22:35Z","updated_at":"2017-09-20T14:22:36Z","html_url":"https://github.com/Coursemology/coursemology2/pull/2521#discussion_r139983958","pull_request_url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2521","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/comments/139983958"},"html":{"href":"https://github.com/Coursemology/coursemology2/pull/2521#discussion_r139983958"},"pull_request":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2521"}}},"pull_request":{"url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2521","id":141785615,"html_url":"https://github.com/Coursemology/coursemology2/pull/2521","diff_url":"https://github.com/Coursemology/coursemology2/pull/2521.diff","patch_url":"https://github.com/Coursemology/coursemology2/pull/2521.patch","issue_url":"https://api.github.com/repos/Coursemology/coursemology2/issues/2521","number":2521,"state":"open","locked":false,"title":"Download statistics in submission page","user":{"login":"huangjosh","id":26079252,"avatar_url":"https://avatars0.githubusercontent.com/u/26079252?v=4","gravatar_id":"","url":"https://api.github.com/users/huangjosh","html_url":"https://github.com/huangjosh","followers_url":"https://api.github.com/users/huangjosh/followers","following_url":"https://api.github.com/users/huangjosh/following{/other_user}","gists_url":"https://api.github.com/users/huangjosh/gists{/gist_id}","starred_url":"https://api.github.com/users/huangjosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangjosh/subscriptions","organizations_url":"https://api.github.com/users/huangjosh/orgs","repos_url":"https://api.github.com/users/huangjosh/repos","events_url":"https://api.github.com/users/huangjosh/events{/privacy}","received_events_url":"https://api.github.com/users/huangjosh/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-09-19T08:24:05Z","updated_at":"2017-09-20T14:22:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab65e9cac08256019541bcc542e38673e2bea135","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2521/commits","review_comments_url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2521/comments","review_comment_url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Coursemology/coursemology2/issues/2521/comments","statuses_url":"https://api.github.com/repos/Coursemology/coursemology2/statuses/52517570f51229fa82ee530b127e0e27b7d1ce8d","head":{"label":"huangjosh:download_statistics","ref":"download_statistics","sha":"52517570f51229fa82ee530b127e0e27b7d1ce8d","user":{"login":"huangjosh","id":26079252,"avatar_url":"https://avatars0.githubusercontent.com/u/26079252?v=4","gravatar_id":"","url":"https://api.github.com/users/huangjosh","html_url":"https://github.com/huangjosh","followers_url":"https://api.github.com/users/huangjosh/followers","following_url":"https://api.github.com/users/huangjosh/following{/other_user}","gists_url":"https://api.github.com/users/huangjosh/gists{/gist_id}","starred_url":"https://api.github.com/users/huangjosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangjosh/subscriptions","organizations_url":"https://api.github.com/users/huangjosh/orgs","repos_url":"https://api.github.com/users/huangjosh/repos","events_url":"https://api.github.com/users/huangjosh/events{/privacy}","received_events_url":"https://api.github.com/users/huangjosh/received_events","type":"User","site_admin":false},"repo":{"id":96733807,"name":"coursemology_fork","full_name":"huangjosh/coursemology_fork","owner":{"login":"huangjosh","id":26079252,"avatar_url":"https://avatars0.githubusercontent.com/u/26079252?v=4","gravatar_id":"","url":"https://api.github.com/users/huangjosh","html_url":"https://github.com/huangjosh","followers_url":"https://api.github.com/users/huangjosh/followers","following_url":"https://api.github.com/users/huangjosh/following{/other_user}","gists_url":"https://api.github.com/users/huangjosh/gists{/gist_id}","starred_url":"https://api.github.com/users/huangjosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangjosh/subscriptions","organizations_url":"https://api.github.com/users/huangjosh/orgs","repos_url":"https://api.github.com/users/huangjosh/repos","events_url":"https://api.github.com/users/huangjosh/events{/privacy}","received_events_url":"https://api.github.com/users/huangjosh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/huangjosh/coursemology_fork","description":"Rails 4 re-write of Coursemology","fork":true,"url":"https://api.github.com/repos/huangjosh/coursemology_fork","forks_url":"https://api.github.com/repos/huangjosh/coursemology_fork/forks","keys_url":"https://api.github.com/repos/huangjosh/coursemology_fork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/huangjosh/coursemology_fork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/huangjosh/coursemology_fork/teams","hooks_url":"https://api.github.com/repos/huangjosh/coursemology_fork/hooks","issue_events_url":"https://api.github.com/repos/huangjosh/coursemology_fork/issues/events{/number}","events_url":"https://api.github.com/repos/huangjosh/coursemology_fork/events","assignees_url":"https://api.github.com/repos/huangjosh/coursemology_fork/assignees{/user}","branches_url":"https://api.github.com/repos/huangjosh/coursemology_fork/branches{/branch}","tags_url":"https://api.github.com/repos/huangjosh/coursemology_fork/tags","blobs_url":"https://api.github.com/repos/huangjosh/coursemology_fork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/huangjosh/coursemology_fork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/huangjosh/coursemology_fork/git/refs{/sha}","trees_url":"https://api.github.com/repos/huangjosh/coursemology_fork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/huangjosh/coursemology_fork/statuses/{sha}","languages_url":"https://api.github.com/repos/huangjosh/coursemology_fork/languages","stargazers_url":"https://api.github.com/repos/huangjosh/coursemology_fork/stargazers","contributors_url":"https://api.github.com/repos/huangjosh/coursemology_fork/contributors","subscribers_url":"https://api.github.com/repos/huangjosh/coursemology_fork/subscribers","subscription_url":"https://api.github.com/repos/huangjosh/coursemology_fork/subscription","commits_url":"https://api.github.com/repos/huangjosh/coursemology_fork/commits{/sha}","git_commits_url":"https://api.github.com/repos/huangjosh/coursemology_fork/git/commits{/sha}","comments_url":"https://api.github.com/repos/huangjosh/coursemology_fork/comments{/number}","issue_comment_url":"https://api.github.com/repos/huangjosh/coursemology_fork/issues/comments{/number}","contents_url":"https://api.github.com/repos/huangjosh/coursemology_fork/contents/{+path}","compare_url":"https://api.github.com/repos/huangjosh/coursemology_fork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/huangjosh/coursemology_fork/merges","archive_url":"https://api.github.com/repos/huangjosh/coursemology_fork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/huangjosh/coursemology_fork/downloads","issues_url":"https://api.github.com/repos/huangjosh/coursemology_fork/issues{/number}","pulls_url":"https://api.github.com/repos/huangjosh/coursemology_fork/pulls{/number}","milestones_url":"https://api.github.com/repos/huangjosh/coursemology_fork/milestones{/number}","notifications_url":"https://api.github.com/repos/huangjosh/coursemology_fork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/huangjosh/coursemology_fork/labels{/name}","releases_url":"https://api.github.com/repos/huangjosh/coursemology_fork/releases{/id}","deployments_url":"https://api.github.com/repos/huangjosh/coursemology_fork/deployments","created_at":"2017-07-10T03:53:21Z","updated_at":"2017-07-10T03:54:49Z","pushed_at":"2017-09-20T10:52:56Z","git_url":"git://github.com/huangjosh/coursemology_fork.git","ssh_url":"git@github.com:huangjosh/coursemology_fork.git","clone_url":"https://github.com/huangjosh/coursemology_fork.git","svn_url":"https://github.com/huangjosh/coursemology_fork","homepage":"https://coursemology.org","size":9373,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"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":"Coursemology:master","ref":"master","sha":"45c417c7022b74480c082124b20f1cc868621b42","user":{"login":"Coursemology","id":4427741,"avatar_url":"https://avatars0.githubusercontent.com/u/4427741?v=4","gravatar_id":"","url":"https://api.github.com/users/Coursemology","html_url":"https://github.com/Coursemology","followers_url":"https://api.github.com/users/Coursemology/followers","following_url":"https://api.github.com/users/Coursemology/following{/other_user}","gists_url":"https://api.github.com/users/Coursemology/gists{/gist_id}","starred_url":"https://api.github.com/users/Coursemology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coursemology/subscriptions","organizations_url":"https://api.github.com/users/Coursemology/orgs","repos_url":"https://api.github.com/users/Coursemology/repos","events_url":"https://api.github.com/users/Coursemology/events{/privacy}","received_events_url":"https://api.github.com/users/Coursemology/received_events","type":"Organization","site_admin":false},"repo":{"id":22155032,"name":"coursemology2","full_name":"Coursemology/coursemology2","owner":{"login":"Coursemology","id":4427741,"avatar_url":"https://avatars0.githubusercontent.com/u/4427741?v=4","gravatar_id":"","url":"https://api.github.com/users/Coursemology","html_url":"https://github.com/Coursemology","followers_url":"https://api.github.com/users/Coursemology/followers","following_url":"https://api.github.com/users/Coursemology/following{/other_user}","gists_url":"https://api.github.com/users/Coursemology/gists{/gist_id}","starred_url":"https://api.github.com/users/Coursemology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coursemology/subscriptions","organizations_url":"https://api.github.com/users/Coursemology/orgs","repos_url":"https://api.github.com/users/Coursemology/repos","events_url":"https://api.github.com/users/Coursemology/events{/privacy}","received_events_url":"https://api.github.com/users/Coursemology/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Coursemology/coursemology2","description":"Rails 4 re-write of Coursemology","fork":false,"url":"https://api.github.com/repos/Coursemology/coursemology2","forks_url":"https://api.github.com/repos/Coursemology/coursemology2/forks","keys_url":"https://api.github.com/repos/Coursemology/coursemology2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Coursemology/coursemology2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Coursemology/coursemology2/teams","hooks_url":"https://api.github.com/repos/Coursemology/coursemology2/hooks","issue_events_url":"https://api.github.com/repos/Coursemology/coursemology2/issues/events{/number}","events_url":"https://api.github.com/repos/Coursemology/coursemology2/events","assignees_url":"https://api.github.com/repos/Coursemology/coursemology2/assignees{/user}","branches_url":"https://api.github.com/repos/Coursemology/coursemology2/branches{/branch}","tags_url":"https://api.github.com/repos/Coursemology/coursemology2/tags","blobs_url":"https://api.github.com/repos/Coursemology/coursemology2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Coursemology/coursemology2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Coursemology/coursemology2/git/refs{/sha}","trees_url":"https://api.github.com/repos/Coursemology/coursemology2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Coursemology/coursemology2/statuses/{sha}","languages_url":"https://api.github.com/repos/Coursemology/coursemology2/languages","stargazers_url":"https://api.github.com/repos/Coursemology/coursemology2/stargazers","contributors_url":"https://api.github.com/repos/Coursemology/coursemology2/contributors","subscribers_url":"https://api.github.com/repos/Coursemology/coursemology2/subscribers","subscription_url":"https://api.github.com/repos/Coursemology/coursemology2/subscription","commits_url":"https://api.github.com/repos/Coursemology/coursemology2/commits{/sha}","git_commits_url":"https://api.github.com/repos/Coursemology/coursemology2/git/commits{/sha}","comments_url":"https://api.github.com/repos/Coursemology/coursemology2/comments{/number}","issue_comment_url":"https://api.github.com/repos/Coursemology/coursemology2/issues/comments{/number}","contents_url":"https://api.github.com/repos/Coursemology/coursemology2/contents/{+path}","compare_url":"https://api.github.com/repos/Coursemology/coursemology2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Coursemology/coursemology2/merges","archive_url":"https://api.github.com/repos/Coursemology/coursemology2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Coursemology/coursemology2/downloads","issues_url":"https://api.github.com/repos/Coursemology/coursemology2/issues{/number}","pulls_url":"https://api.github.com/repos/Coursemology/coursemology2/pulls{/number}","milestones_url":"https://api.github.com/repos/Coursemology/coursemology2/milestones{/number}","notifications_url":"https://api.github.com/repos/Coursemology/coursemology2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Coursemology/coursemology2/labels{/name}","releases_url":"https://api.github.com/repos/Coursemology/coursemology2/releases{/id}","deployments_url":"https://api.github.com/repos/Coursemology/coursemology2/deployments","created_at":"2014-07-23T14:57:06Z","updated_at":"2017-08-12T01:43:05Z","pushed_at":"2017-09-20T14:15:07Z","git_url":"git://github.com/Coursemology/coursemology2.git","ssh_url":"git@github.com:Coursemology/coursemology2.git","clone_url":"https://github.com/Coursemology/coursemology2.git","svn_url":"https://github.com/Coursemology/coursemology2","homepage":"https://coursemology.org","size":9367,"stargazers_count":38,"watchers_count":38,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":187,"forks":35,"open_issues":187,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2521"},"html":{"href":"https://github.com/Coursemology/coursemology2/pull/2521"},"issue":{"href":"https://api.github.com/repos/Coursemology/coursemology2/issues/2521"},"comments":{"href":"https://api.github.com/repos/Coursemology/coursemology2/issues/2521/comments"},"review_comments":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2521/comments"},"review_comment":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2521/commits"},"statuses":{"href":"https://api.github.com/repos/Coursemology/coursemology2/statuses/52517570f51229fa82ee530b127e0e27b7d1ce8d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"weiqingtoh"}}