{"action":"created","comment":{"url":"https://api.github.com/repos/ga-dc/garnet/pulls/comments/58801492","id":58801492,"diff_hunk":"@@ -21,8 +21,8 @@ class Assignment < ActiveRecord::Base\n   ]\n \n   def create_submissions\n-    self.cohort.memberships.where(is_admin: false).each do |membership|\n-      membership.submissions.unmarked.create(assignment_id: self.id)\n+    self.cohort.memberships.student.active.each do |membership|","path":"app/models/assignment.rb","position":6,"original_position":6,"commit_id":"41160f1421ad7667feba10ede6b1d98cf85fd609","original_commit_id":"41160f1421ad7667feba10ede6b1d98cf85fd609","user":{"login":"adambray","id":75565,"avatar_url":"https://avatars.githubusercontent.com/u/75565?v=3","gravatar_id":"","url":"https://api.github.com/users/adambray","html_url":"https://github.com/adambray","followers_url":"https://api.github.com/users/adambray/followers","following_url":"https://api.github.com/users/adambray/following{/other_user}","gists_url":"https://api.github.com/users/adambray/gists{/gist_id}","starred_url":"https://api.github.com/users/adambray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adambray/subscriptions","organizations_url":"https://api.github.com/users/adambray/orgs","repos_url":"https://api.github.com/users/adambray/repos","events_url":"https://api.github.com/users/adambray/events{/privacy}","received_events_url":"https://api.github.com/users/adambray/received_events","type":"User","site_admin":false},"body":"This line doesn't make the fix, but it's cleaner, and prevents creating submissions for students who are deactivated.","created_at":"2016-04-06T23:55:18Z","updated_at":"2016-04-06T23:55:18Z","html_url":"https://github.com/ga-dc/garnet/pull/579#discussion_r58801492","pull_request_url":"https://api.github.com/repos/ga-dc/garnet/pulls/579","_links":{"self":{"href":"https://api.github.com/repos/ga-dc/garnet/pulls/comments/58801492"},"html":{"href":"https://github.com/ga-dc/garnet/pull/579#discussion_r58801492"},"pull_request":{"href":"https://api.github.com/repos/ga-dc/garnet/pulls/579"}}},"pull_request":{"url":"https://api.github.com/repos/ga-dc/garnet/pulls/579","id":65470372,"html_url":"https://github.com/ga-dc/garnet/pull/579","diff_url":"https://github.com/ga-dc/garnet/pull/579.diff","patch_url":"https://github.com/ga-dc/garnet/pull/579.patch","issue_url":"https://api.github.com/repos/ga-dc/garnet/issues/579","number":579,"state":"open","locked":false,"title":"fixes #543, updates percent_from status","user":{"login":"andrewsunglaekim","id":8976305,"avatar_url":"https://avatars.githubusercontent.com/u/8976305?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewsunglaekim","html_url":"https://github.com/andrewsunglaekim","followers_url":"https://api.github.com/users/andrewsunglaekim/followers","following_url":"https://api.github.com/users/andrewsunglaekim/following{/other_user}","gists_url":"https://api.github.com/users/andrewsunglaekim/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewsunglaekim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewsunglaekim/subscriptions","organizations_url":"https://api.github.com/users/andrewsunglaekim/orgs","repos_url":"https://api.github.com/users/andrewsunglaekim/repos","events_url":"https://api.github.com/users/andrewsunglaekim/events{/privacy}","received_events_url":"https://api.github.com/users/andrewsunglaekim/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-06T13:56:50Z","updated_at":"2016-04-06T23:55:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a332576f946d689c14261d90633a86aaa476184","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ga-dc/garnet/pulls/579/commits","review_comments_url":"https://api.github.com/repos/ga-dc/garnet/pulls/579/comments","review_comment_url":"https://api.github.com/repos/ga-dc/garnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-dc/garnet/issues/579/comments","statuses_url":"https://api.github.com/repos/ga-dc/garnet/statuses/41160f1421ad7667feba10ede6b1d98cf85fd609","head":{"label":"ga-dc:fix_zero_hw","ref":"fix_zero_hw","sha":"41160f1421ad7667feba10ede6b1d98cf85fd609","user":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"repo":{"id":43320430,"name":"garnet","full_name":"ga-dc/garnet","owner":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-dc/garnet","description":"Classroom Management tools","fork":false,"url":"https://api.github.com/repos/ga-dc/garnet","forks_url":"https://api.github.com/repos/ga-dc/garnet/forks","keys_url":"https://api.github.com/repos/ga-dc/garnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-dc/garnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-dc/garnet/teams","hooks_url":"https://api.github.com/repos/ga-dc/garnet/hooks","issue_events_url":"https://api.github.com/repos/ga-dc/garnet/issues/events{/number}","events_url":"https://api.github.com/repos/ga-dc/garnet/events","assignees_url":"https://api.github.com/repos/ga-dc/garnet/assignees{/user}","branches_url":"https://api.github.com/repos/ga-dc/garnet/branches{/branch}","tags_url":"https://api.github.com/repos/ga-dc/garnet/tags","blobs_url":"https://api.github.com/repos/ga-dc/garnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-dc/garnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-dc/garnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-dc/garnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-dc/garnet/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-dc/garnet/languages","stargazers_url":"https://api.github.com/repos/ga-dc/garnet/stargazers","contributors_url":"https://api.github.com/repos/ga-dc/garnet/contributors","subscribers_url":"https://api.github.com/repos/ga-dc/garnet/subscribers","subscription_url":"https://api.github.com/repos/ga-dc/garnet/subscription","commits_url":"https://api.github.com/repos/ga-dc/garnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-dc/garnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-dc/garnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-dc/garnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-dc/garnet/contents/{+path}","compare_url":"https://api.github.com/repos/ga-dc/garnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-dc/garnet/merges","archive_url":"https://api.github.com/repos/ga-dc/garnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-dc/garnet/downloads","issues_url":"https://api.github.com/repos/ga-dc/garnet/issues{/number}","pulls_url":"https://api.github.com/repos/ga-dc/garnet/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-dc/garnet/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-dc/garnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-dc/garnet/labels{/name}","releases_url":"https://api.github.com/repos/ga-dc/garnet/releases{/id}","deployments_url":"https://api.github.com/repos/ga-dc/garnet/deployments","created_at":"2015-09-28T18:56:26Z","updated_at":"2016-03-30T01:21:54Z","pushed_at":"2016-04-06T23:53:12Z","git_url":"git://github.com/ga-dc/garnet.git","ssh_url":"git@github.com:ga-dc/garnet.git","clone_url":"https://github.com/ga-dc/garnet.git","svn_url":"https://github.com/ga-dc/garnet","homepage":"http://garnet.wdidc.org","size":1695,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":64,"forks":13,"open_issues":64,"watchers":8,"default_branch":"master"}},"base":{"label":"ga-dc:master","ref":"master","sha":"6d958e08628e98ccbd6fede3fd3da733db8306d2","user":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"repo":{"id":43320430,"name":"garnet","full_name":"ga-dc/garnet","owner":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-dc/garnet","description":"Classroom Management tools","fork":false,"url":"https://api.github.com/repos/ga-dc/garnet","forks_url":"https://api.github.com/repos/ga-dc/garnet/forks","keys_url":"https://api.github.com/repos/ga-dc/garnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-dc/garnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-dc/garnet/teams","hooks_url":"https://api.github.com/repos/ga-dc/garnet/hooks","issue_events_url":"https://api.github.com/repos/ga-dc/garnet/issues/events{/number}","events_url":"https://api.github.com/repos/ga-dc/garnet/events","assignees_url":"https://api.github.com/repos/ga-dc/garnet/assignees{/user}","branches_url":"https://api.github.com/repos/ga-dc/garnet/branches{/branch}","tags_url":"https://api.github.com/repos/ga-dc/garnet/tags","blobs_url":"https://api.github.com/repos/ga-dc/garnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-dc/garnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-dc/garnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-dc/garnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-dc/garnet/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-dc/garnet/languages","stargazers_url":"https://api.github.com/repos/ga-dc/garnet/stargazers","contributors_url":"https://api.github.com/repos/ga-dc/garnet/contributors","subscribers_url":"https://api.github.com/repos/ga-dc/garnet/subscribers","subscription_url":"https://api.github.com/repos/ga-dc/garnet/subscription","commits_url":"https://api.github.com/repos/ga-dc/garnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-dc/garnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-dc/garnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-dc/garnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-dc/garnet/contents/{+path}","compare_url":"https://api.github.com/repos/ga-dc/garnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-dc/garnet/merges","archive_url":"https://api.github.com/repos/ga-dc/garnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-dc/garnet/downloads","issues_url":"https://api.github.com/repos/ga-dc/garnet/issues{/number}","pulls_url":"https://api.github.com/repos/ga-dc/garnet/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-dc/garnet/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-dc/garnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-dc/garnet/labels{/name}","releases_url":"https://api.github.com/repos/ga-dc/garnet/releases{/id}","deployments_url":"https://api.github.com/repos/ga-dc/garnet/deployments","created_at":"2015-09-28T18:56:26Z","updated_at":"2016-03-30T01:21:54Z","pushed_at":"2016-04-06T23:53:12Z","git_url":"git://github.com/ga-dc/garnet.git","ssh_url":"git@github.com:ga-dc/garnet.git","clone_url":"https://github.com/ga-dc/garnet.git","svn_url":"https://github.com/ga-dc/garnet","homepage":"http://garnet.wdidc.org","size":1695,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":64,"forks":13,"open_issues":64,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-dc/garnet/pulls/579"},"html":{"href":"https://github.com/ga-dc/garnet/pull/579"},"issue":{"href":"https://api.github.com/repos/ga-dc/garnet/issues/579"},"comments":{"href":"https://api.github.com/repos/ga-dc/garnet/issues/579/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-dc/garnet/pulls/579/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-dc/garnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-dc/garnet/pulls/579/commits"},"statuses":{"href":"https://api.github.com/repos/ga-dc/garnet/statuses/41160f1421ad7667feba10ede6b1d98cf85fd609"}}}}