{"action":"created","comment":{"url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments/49936867","id":49936867,"diff_hunk":"@@ -19,6 +19,16 @@ class Result < ActiveRecord::Base\n \n   before_save :check_for_nil_marks\n \n+  scope :submitted_results, -> {\n+    where.not(marking_state: MARKING_STATES[:unmarked])\n+  }\n+\n+  scope :submitted_remarks_and_all_non_remarks, -> {\n+    results = Result.arel_table\n+    where(results[:remark_request_submitted_at].eq(nil).or(results[:marking_state].not_eq(MARKING_STATES[:unmarked])))\n+  }\n+\n+","path":"app/models/result.rb","position":13,"original_position":13,"commit_id":"ecc9303ab8abdce71a49d6040bd764e27064d586","original_commit_id":"ecc9303ab8abdce71a49d6040bd764e27064d586","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Extra blank line detected.","created_at":"2016-01-16T20:37:42Z","updated_at":"2016-01-16T20:37:42Z","html_url":"https://github.com/MarkUsProject/Markus/pull/2423#discussion_r49936867","pull_request_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2423","_links":{"self":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments/49936867"},"html":{"href":"https://github.com/MarkUsProject/Markus/pull/2423#discussion_r49936867"},"pull_request":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2423"}}},"pull_request":{"url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2423","id":56262547,"html_url":"https://github.com/MarkUsProject/Markus/pull/2423","diff_url":"https://github.com/MarkUsProject/Markus/pull/2423.diff","patch_url":"https://github.com/MarkUsProject/Markus/pull/2423.patch","issue_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/2423","number":2423,"state":"open","locked":false,"title":"2244-Refactor submission result relationship","user":{"login":"aclar48","id":2347702,"avatar_url":"https://avatars.githubusercontent.com/u/2347702?v=3","gravatar_id":"","url":"https://api.github.com/users/aclar48","html_url":"https://github.com/aclar48","followers_url":"https://api.github.com/users/aclar48/followers","following_url":"https://api.github.com/users/aclar48/following{/other_user}","gists_url":"https://api.github.com/users/aclar48/gists{/gist_id}","starred_url":"https://api.github.com/users/aclar48/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aclar48/subscriptions","organizations_url":"https://api.github.com/users/aclar48/orgs","repos_url":"https://api.github.com/users/aclar48/repos","events_url":"https://api.github.com/users/aclar48/events{/privacy}","received_events_url":"https://api.github.com/users/aclar48/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-16T20:37:32Z","updated_at":"2016-01-16T20:37:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f0536d17fa7a42496b5bd00aa4d1b11b9ddead3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2423/commits","review_comments_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2423/comments","review_comment_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/2423/comments","statuses_url":"https://api.github.com/repos/MarkUsProject/Markus/statuses/ecc9303ab8abdce71a49d6040bd764e27064d586","head":{"label":"aclar48:refactor-submission-result-relationship","ref":"refactor-submission-result-relationship","sha":"ecc9303ab8abdce71a49d6040bd764e27064d586","user":{"login":"aclar48","id":2347702,"avatar_url":"https://avatars.githubusercontent.com/u/2347702?v=3","gravatar_id":"","url":"https://api.github.com/users/aclar48","html_url":"https://github.com/aclar48","followers_url":"https://api.github.com/users/aclar48/followers","following_url":"https://api.github.com/users/aclar48/following{/other_user}","gists_url":"https://api.github.com/users/aclar48/gists{/gist_id}","starred_url":"https://api.github.com/users/aclar48/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aclar48/subscriptions","organizations_url":"https://api.github.com/users/aclar48/orgs","repos_url":"https://api.github.com/users/aclar48/repos","events_url":"https://api.github.com/users/aclar48/events{/privacy}","received_events_url":"https://api.github.com/users/aclar48/received_events","type":"User","site_admin":false},"repo":{"id":49727418,"name":"Markus","full_name":"aclar48/Markus","owner":{"login":"aclar48","id":2347702,"avatar_url":"https://avatars.githubusercontent.com/u/2347702?v=3","gravatar_id":"","url":"https://api.github.com/users/aclar48","html_url":"https://github.com/aclar48","followers_url":"https://api.github.com/users/aclar48/followers","following_url":"https://api.github.com/users/aclar48/following{/other_user}","gists_url":"https://api.github.com/users/aclar48/gists{/gist_id}","starred_url":"https://api.github.com/users/aclar48/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aclar48/subscriptions","organizations_url":"https://api.github.com/users/aclar48/orgs","repos_url":"https://api.github.com/users/aclar48/repos","events_url":"https://api.github.com/users/aclar48/events{/privacy}","received_events_url":"https://api.github.com/users/aclar48/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aclar48/Markus","description":"Git repository of MarkUs","fork":true,"url":"https://api.github.com/repos/aclar48/Markus","forks_url":"https://api.github.com/repos/aclar48/Markus/forks","keys_url":"https://api.github.com/repos/aclar48/Markus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aclar48/Markus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aclar48/Markus/teams","hooks_url":"https://api.github.com/repos/aclar48/Markus/hooks","issue_events_url":"https://api.github.com/repos/aclar48/Markus/issues/events{/number}","events_url":"https://api.github.com/repos/aclar48/Markus/events","assignees_url":"https://api.github.com/repos/aclar48/Markus/assignees{/user}","branches_url":"https://api.github.com/repos/aclar48/Markus/branches{/branch}","tags_url":"https://api.github.com/repos/aclar48/Markus/tags","blobs_url":"https://api.github.com/repos/aclar48/Markus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aclar48/Markus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aclar48/Markus/git/refs{/sha}","trees_url":"https://api.github.com/repos/aclar48/Markus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aclar48/Markus/statuses/{sha}","languages_url":"https://api.github.com/repos/aclar48/Markus/languages","stargazers_url":"https://api.github.com/repos/aclar48/Markus/stargazers","contributors_url":"https://api.github.com/repos/aclar48/Markus/contributors","subscribers_url":"https://api.github.com/repos/aclar48/Markus/subscribers","subscription_url":"https://api.github.com/repos/aclar48/Markus/subscription","commits_url":"https://api.github.com/repos/aclar48/Markus/commits{/sha}","git_commits_url":"https://api.github.com/repos/aclar48/Markus/git/commits{/sha}","comments_url":"https://api.github.com/repos/aclar48/Markus/comments{/number}","issue_comment_url":"https://api.github.com/repos/aclar48/Markus/issues/comments{/number}","contents_url":"https://api.github.com/repos/aclar48/Markus/contents/{+path}","compare_url":"https://api.github.com/repos/aclar48/Markus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aclar48/Markus/merges","archive_url":"https://api.github.com/repos/aclar48/Markus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aclar48/Markus/downloads","issues_url":"https://api.github.com/repos/aclar48/Markus/issues{/number}","pulls_url":"https://api.github.com/repos/aclar48/Markus/pulls{/number}","milestones_url":"https://api.github.com/repos/aclar48/Markus/milestones{/number}","notifications_url":"https://api.github.com/repos/aclar48/Markus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aclar48/Markus/labels{/name}","releases_url":"https://api.github.com/repos/aclar48/Markus/releases{/id}","created_at":"2016-01-15T15:31:55Z","updated_at":"2016-01-15T15:31:58Z","pushed_at":"2016-01-16T20:36:33Z","git_url":"git://github.com/aclar48/Markus.git","ssh_url":"git@github.com:aclar48/Markus.git","clone_url":"https://github.com/aclar48/Markus.git","svn_url":"https://github.com/aclar48/Markus","homepage":"http://www.markusproject.org","size":24117,"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":"MarkUsProject:master","ref":"master","sha":"d611093a1d0e8e2e2fd09d2b6ba3e016e40aa210","user":{"login":"MarkUsProject","id":415874,"avatar_url":"https://avatars.githubusercontent.com/u/415874?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkUsProject","html_url":"https://github.com/MarkUsProject","followers_url":"https://api.github.com/users/MarkUsProject/followers","following_url":"https://api.github.com/users/MarkUsProject/following{/other_user}","gists_url":"https://api.github.com/users/MarkUsProject/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkUsProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkUsProject/subscriptions","organizations_url":"https://api.github.com/users/MarkUsProject/orgs","repos_url":"https://api.github.com/users/MarkUsProject/repos","events_url":"https://api.github.com/users/MarkUsProject/events{/privacy}","received_events_url":"https://api.github.com/users/MarkUsProject/received_events","type":"Organization","site_admin":false},"repo":{"id":940538,"name":"Markus","full_name":"MarkUsProject/Markus","owner":{"login":"MarkUsProject","id":415874,"avatar_url":"https://avatars.githubusercontent.com/u/415874?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkUsProject","html_url":"https://github.com/MarkUsProject","followers_url":"https://api.github.com/users/MarkUsProject/followers","following_url":"https://api.github.com/users/MarkUsProject/following{/other_user}","gists_url":"https://api.github.com/users/MarkUsProject/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkUsProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkUsProject/subscriptions","organizations_url":"https://api.github.com/users/MarkUsProject/orgs","repos_url":"https://api.github.com/users/MarkUsProject/repos","events_url":"https://api.github.com/users/MarkUsProject/events{/privacy}","received_events_url":"https://api.github.com/users/MarkUsProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MarkUsProject/Markus","description":"Git repository of MarkUs","fork":false,"url":"https://api.github.com/repos/MarkUsProject/Markus","forks_url":"https://api.github.com/repos/MarkUsProject/Markus/forks","keys_url":"https://api.github.com/repos/MarkUsProject/Markus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarkUsProject/Markus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarkUsProject/Markus/teams","hooks_url":"https://api.github.com/repos/MarkUsProject/Markus/hooks","issue_events_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/events{/number}","events_url":"https://api.github.com/repos/MarkUsProject/Markus/events","assignees_url":"https://api.github.com/repos/MarkUsProject/Markus/assignees{/user}","branches_url":"https://api.github.com/repos/MarkUsProject/Markus/branches{/branch}","tags_url":"https://api.github.com/repos/MarkUsProject/Markus/tags","blobs_url":"https://api.github.com/repos/MarkUsProject/Markus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarkUsProject/Markus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarkUsProject/Markus/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarkUsProject/Markus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarkUsProject/Markus/statuses/{sha}","languages_url":"https://api.github.com/repos/MarkUsProject/Markus/languages","stargazers_url":"https://api.github.com/repos/MarkUsProject/Markus/stargazers","contributors_url":"https://api.github.com/repos/MarkUsProject/Markus/contributors","subscribers_url":"https://api.github.com/repos/MarkUsProject/Markus/subscribers","subscription_url":"https://api.github.com/repos/MarkUsProject/Markus/subscription","commits_url":"https://api.github.com/repos/MarkUsProject/Markus/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarkUsProject/Markus/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarkUsProject/Markus/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/comments{/number}","contents_url":"https://api.github.com/repos/MarkUsProject/Markus/contents/{+path}","compare_url":"https://api.github.com/repos/MarkUsProject/Markus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarkUsProject/Markus/merges","archive_url":"https://api.github.com/repos/MarkUsProject/Markus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarkUsProject/Markus/downloads","issues_url":"https://api.github.com/repos/MarkUsProject/Markus/issues{/number}","pulls_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls{/number}","milestones_url":"https://api.github.com/repos/MarkUsProject/Markus/milestones{/number}","notifications_url":"https://api.github.com/repos/MarkUsProject/Markus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarkUsProject/Markus/labels{/name}","releases_url":"https://api.github.com/repos/MarkUsProject/Markus/releases{/id}","created_at":"2010-09-26T16:18:08Z","updated_at":"2016-01-13T17:46:31Z","pushed_at":"2016-01-16T20:37:32Z","git_url":"git://github.com/MarkUsProject/Markus.git","ssh_url":"git@github.com:MarkUsProject/Markus.git","clone_url":"https://github.com/MarkUsProject/Markus.git","svn_url":"https://github.com/MarkUsProject/Markus","homepage":"http://www.markusproject.org","size":32626,"stargazers_count":134,"watchers_count":134,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":169,"mirror_url":null,"open_issues_count":102,"forks":169,"open_issues":102,"watchers":134,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2423"},"html":{"href":"https://github.com/MarkUsProject/Markus/pull/2423"},"issue":{"href":"https://api.github.com/repos/MarkUsProject/Markus/issues/2423"},"comments":{"href":"https://api.github.com/repos/MarkUsProject/Markus/issues/2423/comments"},"review_comments":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2423/comments"},"review_comment":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2423/commits"},"statuses":{"href":"https://api.github.com/repos/MarkUsProject/Markus/statuses/ecc9303ab8abdce71a49d6040bd764e27064d586"}}}}