GitHub PullRequestReviewCommentEvent at 2014-09-14 11:36:02
Repository: repo
Actor: damithc
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/17518911","id":17518911,"diff_hunk":"@@ -562,11 +577,42 @@ public void deleteFeedbackResponseAndCascade(FeedbackResponseAttributes response\n         frDb.deleteEntity(responseToDelete);\n     }\n \n-    public void deleteFeedbackResponsesForQuestionAndCascade(String feedbackQuestionId) {\n+    public void deleteFeedbackResponsesForQuestionAndCascade(\n+            String feedbackQuestionId, boolean hasResponseRateCheck) {\n         List<FeedbackResponseAttributes> responsesForQuestion =\n                 getFeedbackResponsesForQuestion(feedbackQuestionId);\n+\n+        Set<String> emails = new HashSet<String>();\n+\n         for (FeedbackResponseAttributes response : responsesForQuestion) {\n             this.deleteFeedbackResponseAndCascade(response);\n+            emails.add(response.giverEmail);\n+        }\n+\n+        try {\n+            if (hasResponseRateCheck) {\n+                FeedbackQuestionAttributes question = fqLogic\n+                        .getFeedbackQuestion(feedbackQuestionId);\n+                boolean isInstructor = (question.giverType == FeedbackParticipantType.SELF || question.giverType == FeedbackParticipantType.INSTRUCTORS);\n+                for (String email : emails) {\n+                    boolean hasResponses = checkIfGiverHasResponsesForSession(email, question.feedbackSessionName, question.courseId);\n+                    if (!hasResponses) {","path":"src/main/java/teammates/logic/core/FeedbackResponsesLogic.java","position":68,"original_position":68,"commit_id":"f053a35f0b70f53976199eee1c653bee21b92414","original_commit_id":"f053a35f0b70f53976199eee1c653bee21b92414","user":{"login":"damithc","id":1673303,"avatar_url":"https://avatars.githubusercontent.com/u/1673303?v=2","gravatar_id":"4a2f363c8453eaa4bd22e53e88255d44","url":"https://api.github.com/users/damithc","html_url":"https://github.com/damithc","followers_url":"https://api.github.com/users/damithc/followers","following_url":"https://api.github.com/users/damithc/following{/other_user}","gists_url":"https://api.github.com/users/damithc/gists{/gist_id}","starred_url":"https://api.github.com/users/damithc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damithc/subscriptions","organizations_url":"https://api.github.com/users/damithc/orgs","repos_url":"https://api.github.com/users/damithc/repos","events_url":"https://api.github.com/users/damithc/events{/privacy}","received_events_url":"https://api.github.com/users/damithc/received_events","type":"User","site_admin":false},"body":"Nesting can be reduced here as well. e.g.\r\n```\r\nif(hasResponse){\r\n   continue;\r\n}else if ...\r\n```","created_at":"2014-09-14T11:36:02Z","updated_at":"2014-09-14T11:36:02Z","html_url":"https://github.com/TEAMMATES/repo/pull/2522#discussion_r17518911","pull_request_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/2522","_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/17518911"},"html":{"href":"https://github.com/TEAMMATES/repo/pull/2522#discussion_r17518911"},"pull_request":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/2522"}}},"pull_request":{"url":"https://api.github.com/repos/TEAMMATES/repo/pulls/2522","id":21198477,"html_url":"https://github.com/TEAMMATES/repo/pull/2522","diff_url":"https://github.com/TEAMMATES/repo/pull/2522.diff","patch_url":"https://github.com/TEAMMATES/repo/pull/2522.patch","issue_url":"https://api.github.com/repos/TEAMMATES/repo/issues/2522","number":2522,"state":"open","locked":false,"title":"Store set of responding attendees in each session to request for response rate faster #2452","user":{"login":"imouto1994","id":6555488,"avatar_url":"https://avatars.githubusercontent.com/u/6555488?v=2","gravatar_id":"129c15b540b694fdf4d109677411881c","url":"https://api.github.com/users/imouto1994","html_url":"https://github.com/imouto1994","followers_url":"https://api.github.com/users/imouto1994/followers","following_url":"https://api.github.com/users/imouto1994/following{/other_user}","gists_url":"https://api.github.com/users/imouto1994/gists{/gist_id}","starred_url":"https://api.github.com/users/imouto1994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imouto1994/subscriptions","organizations_url":"https://api.github.com/users/imouto1994/orgs","repos_url":"https://api.github.com/users/imouto1994/repos","events_url":"https://api.github.com/users/imouto1994/events{/privacy}","received_events_url":"https://api.github.com/users/imouto1994/received_events","type":"User","site_admin":false},"body":"Change the logic in storing response rate","created_at":"2014-09-13T23:13:35Z","updated_at":"2014-09-14T11:36:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c8b70b3a8ddf09918f3a7c63ed2730481bec450","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/2522/commits","review_comments_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/2522/comments","review_comment_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/issues/2522/comments","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/f053a35f0b70f53976199eee1c653bee21b92414","head":{"label":"TEAMMATES:Issue2452","ref":"Issue2452","sha":"f053a35f0b70f53976199eee1c653bee21b92414","user":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=2","gravatar_id":null,"url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"repo":{"id":19369035,"name":"repo","full_name":"TEAMMATES/repo","owner":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=2","gravatar_id":null,"url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TEAMMATES/repo","description":"","fork":false,"url":"https://api.github.com/repos/TEAMMATES/repo","forks_url":"https://api.github.com/repos/TEAMMATES/repo/forks","keys_url":"https://api.github.com/repos/TEAMMATES/repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/repo/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/repo/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/repo/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/repo/events","assignees_url":"https://api.github.com/repos/TEAMMATES/repo/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/repo/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/repo/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/repo/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/repo/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/repo/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/repo/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/repo/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/repo/issues/comments/{number}","contents_url":"https://api.github.com/repos/TEAMMATES/repo/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/repo/merges","archive_url":"https://api.github.com/repos/TEAMMATES/repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/repo/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/repo/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/repo/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/repo/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/repo/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/repo/releases{/id}","created_at":"2014-05-02T07:43:00Z","updated_at":"2014-09-02T03:53:09Z","pushed_at":"2014-09-14T08:21:29Z","git_url":"git://github.com/TEAMMATES/repo.git","ssh_url":"git@github.com:TEAMMATES/repo.git","clone_url":"https://github.com/TEAMMATES/repo.git","svn_url":"https://github.com/TEAMMATES/repo","homepage":"","size":123457,"stargazers_count":16,"watchers_count":16,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":14,"mirror_url":null,"open_issues_count":461,"forks":14,"open_issues":461,"watchers":16,"default_branch":"master"}},"base":{"label":"TEAMMATES:master","ref":"master","sha":"1acc1c188d9842b3329bb014c4d70a4a52f42bd8","user":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=2","gravatar_id":null,"url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"repo":{"id":19369035,"name":"repo","full_name":"TEAMMATES/repo","owner":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=2","gravatar_id":null,"url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TEAMMATES/repo","description":"","fork":false,"url":"https://api.github.com/repos/TEAMMATES/repo","forks_url":"https://api.github.com/repos/TEAMMATES/repo/forks","keys_url":"https://api.github.com/repos/TEAMMATES/repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/repo/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/repo/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/repo/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/repo/events","assignees_url":"https://api.github.com/repos/TEAMMATES/repo/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/repo/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/repo/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/repo/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/repo/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/repo/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/repo/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/repo/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/repo/issues/comments/{number}","contents_url":"https://api.github.com/repos/TEAMMATES/repo/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/repo/merges","archive_url":"https://api.github.com/repos/TEAMMATES/repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/repo/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/repo/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/repo/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/repo/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/repo/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/repo/releases{/id}","created_at":"2014-05-02T07:43:00Z","updated_at":"2014-09-02T03:53:09Z","pushed_at":"2014-09-14T08:21:29Z","git_url":"git://github.com/TEAMMATES/repo.git","ssh_url":"git@github.com:TEAMMATES/repo.git","clone_url":"https://github.com/TEAMMATES/repo.git","svn_url":"https://github.com/TEAMMATES/repo","homepage":"","size":123457,"stargazers_count":16,"watchers_count":16,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":14,"mirror_url":null,"open_issues_count":461,"forks":14,"open_issues":461,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/2522"},"html":{"href":"https://github.com/TEAMMATES/repo/pull/2522"},"issue":{"href":"https://api.github.com/repos/TEAMMATES/repo/issues/2522"},"comments":{"href":"https://api.github.com/repos/TEAMMATES/repo/issues/2522/comments"},"review_comments":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/2522/comments"},"review_comment":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/2522/commits"},"statuses":{"href":"https://api.github.com/repos/TEAMMATES/repo/statuses/f053a35f0b70f53976199eee1c653bee21b92414"}}}}