{"action":"created","comment":{"url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/comments/173392276","pull_request_review_id":102576171,"id":173392276,"diff_hunk":"@@ -69,6 +69,14 @@ def deleted\n     where(id: InstanceUser.unscoped.active_in_past_7_days.select(:user_id).distinct)\n   end)\n \n+  # Returns all students of a user for a particular course\n+  #\n+  # @return[Array<CourseUser>]\n+  def my_students(course)\n+    course_user = course_users.find_by(course: course)\n+    course_user.my_students unless course_user.nil?","path":"app/models/user.rb","position":9,"original_position":9,"commit_id":"b5b1e18d8bf6602591dc33d1b404a49b8d6d5a8d","original_commit_id":"b5b1e18d8bf6602591dc33d1b404a49b8d6d5a8d","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Use safe navigation (&.) instead of checking if an object exists before calling the method.","created_at":"2018-03-09T08:45:55Z","updated_at":"2018-03-09T08:45:55Z","html_url":"https://github.com/Coursemology/coursemology2/pull/2862#discussion_r173392276","pull_request_url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2862","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/comments/173392276"},"html":{"href":"https://github.com/Coursemology/coursemology2/pull/2862#discussion_r173392276"},"pull_request":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2862"}}},"pull_request":{"url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2862","id":173687910,"html_url":"https://github.com/Coursemology/coursemology2/pull/2862","diff_url":"https://github.com/Coursemology/coursemology2/pull/2862.diff","patch_url":"https://github.com/Coursemology/coursemology2/pull/2862.patch","issue_url":"https://api.github.com/repos/Coursemology/coursemology2/issues/2862","number":2862,"state":"open","locked":false,"title":"Show own students in a separate table in achievement#show/course_users","user":{"login":"shlok007","id":14155445,"avatar_url":"https://avatars1.githubusercontent.com/u/14155445?v=4","gravatar_id":"","url":"https://api.github.com/users/shlok007","html_url":"https://github.com/shlok007","followers_url":"https://api.github.com/users/shlok007/followers","following_url":"https://api.github.com/users/shlok007/following{/other_user}","gists_url":"https://api.github.com/users/shlok007/gists{/gist_id}","starred_url":"https://api.github.com/users/shlok007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlok007/subscriptions","organizations_url":"https://api.github.com/users/shlok007/orgs","repos_url":"https://api.github.com/users/shlok007/repos","events_url":"https://api.github.com/users/shlok007/events{/privacy}","received_events_url":"https://api.github.com/users/shlok007/received_events","type":"User","site_admin":false},"body":"Closes #1966 .\r\n\r\n![achivements](https://user-images.githubusercontent.com/14155445/37144035-e386ddbe-22e2-11e8-8247-a95069c1c66c.png)\r\n","created_at":"2018-03-08T09:42:56Z","updated_at":"2018-03-09T08:45:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"013aab5ec0fa72cfcf090b7898aa2e332818e86b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":428708484,"url":"https://api.github.com/repos/Coursemology/coursemology2/labels/needs%20review","name":"needs review","color":"e6e6e6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2862/commits","review_comments_url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2862/comments","review_comment_url":"https://api.github.com/repos/Coursemology/coursemology2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Coursemology/coursemology2/issues/2862/comments","statuses_url":"https://api.github.com/repos/Coursemology/coursemology2/statuses/b5b1e18d8bf6602591dc33d1b404a49b8d6d5a8d","head":{"label":"shlok007:manual-achievement","ref":"manual-achievement","sha":"b5b1e18d8bf6602591dc33d1b404a49b8d6d5a8d","user":{"login":"shlok007","id":14155445,"avatar_url":"https://avatars1.githubusercontent.com/u/14155445?v=4","gravatar_id":"","url":"https://api.github.com/users/shlok007","html_url":"https://github.com/shlok007","followers_url":"https://api.github.com/users/shlok007/followers","following_url":"https://api.github.com/users/shlok007/following{/other_user}","gists_url":"https://api.github.com/users/shlok007/gists{/gist_id}","starred_url":"https://api.github.com/users/shlok007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlok007/subscriptions","organizations_url":"https://api.github.com/users/shlok007/orgs","repos_url":"https://api.github.com/users/shlok007/repos","events_url":"https://api.github.com/users/shlok007/events{/privacy}","received_events_url":"https://api.github.com/users/shlok007/received_events","type":"User","site_admin":false},"repo":{"id":123121962,"name":"coursemology2","full_name":"shlok007/coursemology2","owner":{"login":"shlok007","id":14155445,"avatar_url":"https://avatars1.githubusercontent.com/u/14155445?v=4","gravatar_id":"","url":"https://api.github.com/users/shlok007","html_url":"https://github.com/shlok007","followers_url":"https://api.github.com/users/shlok007/followers","following_url":"https://api.github.com/users/shlok007/following{/other_user}","gists_url":"https://api.github.com/users/shlok007/gists{/gist_id}","starred_url":"https://api.github.com/users/shlok007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlok007/subscriptions","organizations_url":"https://api.github.com/users/shlok007/orgs","repos_url":"https://api.github.com/users/shlok007/repos","events_url":"https://api.github.com/users/shlok007/events{/privacy}","received_events_url":"https://api.github.com/users/shlok007/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shlok007/coursemology2","description":"Rails 5 re-write of Coursemology","fork":true,"url":"https://api.github.com/repos/shlok007/coursemology2","forks_url":"https://api.github.com/repos/shlok007/coursemology2/forks","keys_url":"https://api.github.com/repos/shlok007/coursemology2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shlok007/coursemology2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shlok007/coursemology2/teams","hooks_url":"https://api.github.com/repos/shlok007/coursemology2/hooks","issue_events_url":"https://api.github.com/repos/shlok007/coursemology2/issues/events{/number}","events_url":"https://api.github.com/repos/shlok007/coursemology2/events","assignees_url":"https://api.github.com/repos/shlok007/coursemology2/assignees{/user}","branches_url":"https://api.github.com/repos/shlok007/coursemology2/branches{/branch}","tags_url":"https://api.github.com/repos/shlok007/coursemology2/tags","blobs_url":"https://api.github.com/repos/shlok007/coursemology2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shlok007/coursemology2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shlok007/coursemology2/git/refs{/sha}","trees_url":"https://api.github.com/repos/shlok007/coursemology2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shlok007/coursemology2/statuses/{sha}","languages_url":"https://api.github.com/repos/shlok007/coursemology2/languages","stargazers_url":"https://api.github.com/repos/shlok007/coursemology2/stargazers","contributors_url":"https://api.github.com/repos/shlok007/coursemology2/contributors","subscribers_url":"https://api.github.com/repos/shlok007/coursemology2/subscribers","subscription_url":"https://api.github.com/repos/shlok007/coursemology2/subscription","commits_url":"https://api.github.com/repos/shlok007/coursemology2/commits{/sha}","git_commits_url":"https://api.github.com/repos/shlok007/coursemology2/git/commits{/sha}","comments_url":"https://api.github.com/repos/shlok007/coursemology2/comments{/number}","issue_comment_url":"https://api.github.com/repos/shlok007/coursemology2/issues/comments{/number}","contents_url":"https://api.github.com/repos/shlok007/coursemology2/contents/{+path}","compare_url":"https://api.github.com/repos/shlok007/coursemology2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shlok007/coursemology2/merges","archive_url":"https://api.github.com/repos/shlok007/coursemology2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shlok007/coursemology2/downloads","issues_url":"https://api.github.com/repos/shlok007/coursemology2/issues{/number}","pulls_url":"https://api.github.com/repos/shlok007/coursemology2/pulls{/number}","milestones_url":"https://api.github.com/repos/shlok007/coursemology2/milestones{/number}","notifications_url":"https://api.github.com/repos/shlok007/coursemology2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shlok007/coursemology2/labels{/name}","releases_url":"https://api.github.com/repos/shlok007/coursemology2/releases{/id}","deployments_url":"https://api.github.com/repos/shlok007/coursemology2/deployments","created_at":"2018-02-27T11:50:41Z","updated_at":"2018-02-27T11:50:46Z","pushed_at":"2018-03-09T08:45:47Z","git_url":"git://github.com/shlok007/coursemology2.git","ssh_url":"git@github.com:shlok007/coursemology2.git","clone_url":"https://github.com/shlok007/coursemology2.git","svn_url":"https://github.com/shlok007/coursemology2","homepage":"https://coursemology.org","size":11398,"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,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Coursemology:master","ref":"master","sha":"a00b2003503ba7ba504c5cc8a81e34219c99da43","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 5 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":"2018-03-06T01:49:00Z","pushed_at":"2018-03-09T08:45:48Z","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":11380,"stargazers_count":44,"watchers_count":44,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":202,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":43,"open_issues":202,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2862"},"html":{"href":"https://github.com/Coursemology/coursemology2/pull/2862"},"issue":{"href":"https://api.github.com/repos/Coursemology/coursemology2/issues/2862"},"comments":{"href":"https://api.github.com/repos/Coursemology/coursemology2/issues/2862/comments"},"review_comments":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2862/comments"},"review_comment":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Coursemology/coursemology2/pulls/2862/commits"},"statuses":{"href":"https://api.github.com/repos/Coursemology/coursemology2/statuses/b5b1e18d8bf6602591dc33d1b404a49b8d6d5a8d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"houndci-bot"}}