GitHub PullRequestReviewCommentEvent at 2014-12-28 22:25:41
Repository: EvaP
Actor: janno42
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/comments/22300654","id":22300654,"diff_hunk":"@@ -740,29 +740,22 @@ def send_to_users_in_courses(self, courses, recipient_groups):\n                     user_course_map.setdefault(user, []).append(course)\n \n         for user, courses in user_course_map.items():\n-            cc_users = []\n-            if (\"responsible\" in recipient_groups or \"editors\" in recipient_groups) and any(course.is_user_editor(user) for course in courses):\n-                cc_users += user.delegates.all()\n-            cc_users += user.cc_users.all()\n-            cc_addresses = [p.email for p in cc_users if p.email]\n-\n-            mail = EmailMessage(\n-                subject = self.render_string(self.subject, {'user': user, 'courses': courses}),\n-                body = self.render_string(self.body, {'user': user, 'courses': courses}),\n-                to = [user.email],\n-                cc = cc_addresses,\n-                bcc = [a[1] for a in settings.MANAGERS],\n-                headers = {'Reply-To': settings.REPLY_TO_EMAIL})\n-            mail.send(False)\n-\n-    def send_to_user(self, user):\n+            self.send_to_user(user, courses)\n+\n+    def send_to_user(self, user, courses=None):\n         if not user.email:\n             return\n \n+        cc_users = []\n+        cc_users += user.delegates.all()\n+        cc_users += user.cc_users.all()","path":"evap/evaluation/models.py","position":28,"original_position":28,"commit_id":"659b619253d18fea5d7578b9781c02dd5fabce07","original_commit_id":"659b619253d18fea5d7578b9781c02dd5fabce07","user":{"login":"janno42","id":1781719,"avatar_url":"https://avatars.githubusercontent.com/u/1781719?v=3","gravatar_id":"","url":"https://api.github.com/users/janno42","html_url":"https://github.com/janno42","followers_url":"https://api.github.com/users/janno42/followers","following_url":"https://api.github.com/users/janno42/following{/other_user}","gists_url":"https://api.github.com/users/janno42/gists{/gist_id}","starred_url":"https://api.github.com/users/janno42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janno42/subscriptions","organizations_url":"https://api.github.com/users/janno42/orgs","repos_url":"https://api.github.com/users/janno42/repos","events_url":"https://api.github.com/users/janno42/events{/privacy}","received_events_url":"https://api.github.com/users/janno42/received_events","type":"User","site_admin":false},"body":"querysets can't be concatenated by ```+```, but i'll use ```|``` instead.","created_at":"2014-12-28T22:25:41Z","updated_at":"2014-12-28T22:25:41Z","html_url":"https://github.com/fsr-itse/EvaP/pull/452#discussion_r22300654","pull_request_url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/452","_links":{"self":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/comments/22300654"},"html":{"href":"https://github.com/fsr-itse/EvaP/pull/452#discussion_r22300654"},"pull_request":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/452"}}},"pull_request":{"url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/452","id":26627533,"html_url":"https://github.com/fsr-itse/EvaP/pull/452","diff_url":"https://github.com/fsr-itse/EvaP/pull/452.diff","patch_url":"https://github.com/fsr-itse/EvaP/pull/452.patch","issue_url":"https://api.github.com/repos/fsr-itse/EvaP/issues/452","number":452,"state":"open","locked":false,"title":"Only send publish notifications to users who can see results","user":{"login":"janno42","id":1781719,"avatar_url":"https://avatars.githubusercontent.com/u/1781719?v=3","gravatar_id":"","url":"https://api.github.com/users/janno42","html_url":"https://github.com/janno42","followers_url":"https://api.github.com/users/janno42/followers","following_url":"https://api.github.com/users/janno42/following{/other_user}","gists_url":"https://api.github.com/users/janno42/gists{/gist_id}","starred_url":"https://api.github.com/users/janno42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janno42/subscriptions","organizations_url":"https://api.github.com/users/janno42/orgs","repos_url":"https://api.github.com/users/janno42/repos","events_url":"https://api.github.com/users/janno42/events{/privacy}","received_events_url":"https://api.github.com/users/janno42/received_events","type":"User","site_admin":false},"body":"Fixes #386.\r\n\r\nPublish notifications are only sent\r\n- if the course was published for everyone or\r\n- if the user has comments about himself or\r\n- if the user is responsible and there was at least one comment about one contributor or about the course.","created_at":"2014-12-28T20:40:47Z","updated_at":"2014-12-28T22:25:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"edf67720cf1b86506ec0a003b7b184794b38a0d9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/452/commits","review_comments_url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/452/comments","review_comment_url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/comments/{number}","comments_url":"https://api.github.com/repos/fsr-itse/EvaP/issues/452/comments","statuses_url":"https://api.github.com/repos/fsr-itse/EvaP/statuses/659b619253d18fea5d7578b9781c02dd5fabce07","head":{"label":"janno42:email_if_necessary","ref":"email_if_necessary","sha":"659b619253d18fea5d7578b9781c02dd5fabce07","user":{"login":"janno42","id":1781719,"avatar_url":"https://avatars.githubusercontent.com/u/1781719?v=3","gravatar_id":"","url":"https://api.github.com/users/janno42","html_url":"https://github.com/janno42","followers_url":"https://api.github.com/users/janno42/followers","following_url":"https://api.github.com/users/janno42/following{/other_user}","gists_url":"https://api.github.com/users/janno42/gists{/gist_id}","starred_url":"https://api.github.com/users/janno42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janno42/subscriptions","organizations_url":"https://api.github.com/users/janno42/orgs","repos_url":"https://api.github.com/users/janno42/repos","events_url":"https://api.github.com/users/janno42/events{/privacy}","received_events_url":"https://api.github.com/users/janno42/received_events","type":"User","site_admin":false},"repo":{"id":20739629,"name":"EvaP","full_name":"janno42/EvaP","owner":{"login":"janno42","id":1781719,"avatar_url":"https://avatars.githubusercontent.com/u/1781719?v=3","gravatar_id":"","url":"https://api.github.com/users/janno42","html_url":"https://github.com/janno42","followers_url":"https://api.github.com/users/janno42/followers","following_url":"https://api.github.com/users/janno42/following{/other_user}","gists_url":"https://api.github.com/users/janno42/gists{/gist_id}","starred_url":"https://api.github.com/users/janno42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janno42/subscriptions","organizations_url":"https://api.github.com/users/janno42/orgs","repos_url":"https://api.github.com/users/janno42/repos","events_url":"https://api.github.com/users/janno42/events{/privacy}","received_events_url":"https://api.github.com/users/janno42/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/janno42/EvaP","description":"a university course evaluation system written in Python using Django","fork":true,"url":"https://api.github.com/repos/janno42/EvaP","forks_url":"https://api.github.com/repos/janno42/EvaP/forks","keys_url":"https://api.github.com/repos/janno42/EvaP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/janno42/EvaP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/janno42/EvaP/teams","hooks_url":"https://api.github.com/repos/janno42/EvaP/hooks","issue_events_url":"https://api.github.com/repos/janno42/EvaP/issues/events{/number}","events_url":"https://api.github.com/repos/janno42/EvaP/events","assignees_url":"https://api.github.com/repos/janno42/EvaP/assignees{/user}","branches_url":"https://api.github.com/repos/janno42/EvaP/branches{/branch}","tags_url":"https://api.github.com/repos/janno42/EvaP/tags","blobs_url":"https://api.github.com/repos/janno42/EvaP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/janno42/EvaP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/janno42/EvaP/git/refs{/sha}","trees_url":"https://api.github.com/repos/janno42/EvaP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/janno42/EvaP/statuses/{sha}","languages_url":"https://api.github.com/repos/janno42/EvaP/languages","stargazers_url":"https://api.github.com/repos/janno42/EvaP/stargazers","contributors_url":"https://api.github.com/repos/janno42/EvaP/contributors","subscribers_url":"https://api.github.com/repos/janno42/EvaP/subscribers","subscription_url":"https://api.github.com/repos/janno42/EvaP/subscription","commits_url":"https://api.github.com/repos/janno42/EvaP/commits{/sha}","git_commits_url":"https://api.github.com/repos/janno42/EvaP/git/commits{/sha}","comments_url":"https://api.github.com/repos/janno42/EvaP/comments{/number}","issue_comment_url":"https://api.github.com/repos/janno42/EvaP/issues/comments/{number}","contents_url":"https://api.github.com/repos/janno42/EvaP/contents/{+path}","compare_url":"https://api.github.com/repos/janno42/EvaP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/janno42/EvaP/merges","archive_url":"https://api.github.com/repos/janno42/EvaP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/janno42/EvaP/downloads","issues_url":"https://api.github.com/repos/janno42/EvaP/issues{/number}","pulls_url":"https://api.github.com/repos/janno42/EvaP/pulls{/number}","milestones_url":"https://api.github.com/repos/janno42/EvaP/milestones{/number}","notifications_url":"https://api.github.com/repos/janno42/EvaP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/janno42/EvaP/labels{/name}","releases_url":"https://api.github.com/repos/janno42/EvaP/releases{/id}","created_at":"2014-06-11T20:15:30Z","updated_at":"2014-12-06T14:56:20Z","pushed_at":"2014-12-28T22:10:30Z","git_url":"git://github.com/janno42/EvaP.git","ssh_url":"git@github.com:janno42/EvaP.git","clone_url":"https://github.com/janno42/EvaP.git","svn_url":"https://github.com/janno42/EvaP","homepage":"","size":7228,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"fsr-itse:master","ref":"master","sha":"4951d254fbaceaa1404d26b19706dfb8b2b105fc","user":{"login":"fsr-itse","id":1298457,"avatar_url":"https://avatars.githubusercontent.com/u/1298457?v=3","gravatar_id":"","url":"https://api.github.com/users/fsr-itse","html_url":"https://github.com/fsr-itse","followers_url":"https://api.github.com/users/fsr-itse/followers","following_url":"https://api.github.com/users/fsr-itse/following{/other_user}","gists_url":"https://api.github.com/users/fsr-itse/gists{/gist_id}","starred_url":"https://api.github.com/users/fsr-itse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsr-itse/subscriptions","organizations_url":"https://api.github.com/users/fsr-itse/orgs","repos_url":"https://api.github.com/users/fsr-itse/repos","events_url":"https://api.github.com/users/fsr-itse/events{/privacy}","received_events_url":"https://api.github.com/users/fsr-itse/received_events","type":"Organization","site_admin":false},"repo":{"id":3110378,"name":"EvaP","full_name":"fsr-itse/EvaP","owner":{"login":"fsr-itse","id":1298457,"avatar_url":"https://avatars.githubusercontent.com/u/1298457?v=3","gravatar_id":"","url":"https://api.github.com/users/fsr-itse","html_url":"https://github.com/fsr-itse","followers_url":"https://api.github.com/users/fsr-itse/followers","following_url":"https://api.github.com/users/fsr-itse/following{/other_user}","gists_url":"https://api.github.com/users/fsr-itse/gists{/gist_id}","starred_url":"https://api.github.com/users/fsr-itse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsr-itse/subscriptions","organizations_url":"https://api.github.com/users/fsr-itse/orgs","repos_url":"https://api.github.com/users/fsr-itse/repos","events_url":"https://api.github.com/users/fsr-itse/events{/privacy}","received_events_url":"https://api.github.com/users/fsr-itse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fsr-itse/EvaP","description":"a university course evaluation system written in Python using Django","fork":false,"url":"https://api.github.com/repos/fsr-itse/EvaP","forks_url":"https://api.github.com/repos/fsr-itse/EvaP/forks","keys_url":"https://api.github.com/repos/fsr-itse/EvaP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsr-itse/EvaP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsr-itse/EvaP/teams","hooks_url":"https://api.github.com/repos/fsr-itse/EvaP/hooks","issue_events_url":"https://api.github.com/repos/fsr-itse/EvaP/issues/events{/number}","events_url":"https://api.github.com/repos/fsr-itse/EvaP/events","assignees_url":"https://api.github.com/repos/fsr-itse/EvaP/assignees{/user}","branches_url":"https://api.github.com/repos/fsr-itse/EvaP/branches{/branch}","tags_url":"https://api.github.com/repos/fsr-itse/EvaP/tags","blobs_url":"https://api.github.com/repos/fsr-itse/EvaP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsr-itse/EvaP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsr-itse/EvaP/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsr-itse/EvaP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsr-itse/EvaP/statuses/{sha}","languages_url":"https://api.github.com/repos/fsr-itse/EvaP/languages","stargazers_url":"https://api.github.com/repos/fsr-itse/EvaP/stargazers","contributors_url":"https://api.github.com/repos/fsr-itse/EvaP/contributors","subscribers_url":"https://api.github.com/repos/fsr-itse/EvaP/subscribers","subscription_url":"https://api.github.com/repos/fsr-itse/EvaP/subscription","commits_url":"https://api.github.com/repos/fsr-itse/EvaP/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsr-itse/EvaP/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsr-itse/EvaP/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsr-itse/EvaP/issues/comments/{number}","contents_url":"https://api.github.com/repos/fsr-itse/EvaP/contents/{+path}","compare_url":"https://api.github.com/repos/fsr-itse/EvaP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsr-itse/EvaP/merges","archive_url":"https://api.github.com/repos/fsr-itse/EvaP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsr-itse/EvaP/downloads","issues_url":"https://api.github.com/repos/fsr-itse/EvaP/issues{/number}","pulls_url":"https://api.github.com/repos/fsr-itse/EvaP/pulls{/number}","milestones_url":"https://api.github.com/repos/fsr-itse/EvaP/milestones{/number}","notifications_url":"https://api.github.com/repos/fsr-itse/EvaP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsr-itse/EvaP/labels{/name}","releases_url":"https://api.github.com/repos/fsr-itse/EvaP/releases{/id}","created_at":"2012-01-05T13:56:45Z","updated_at":"2014-12-28T22:02:27Z","pushed_at":"2014-12-28T22:02:26Z","git_url":"git://github.com/fsr-itse/EvaP.git","ssh_url":"git@github.com:fsr-itse/EvaP.git","clone_url":"https://github.com/fsr-itse/EvaP.git","svn_url":"https://github.com/fsr-itse/EvaP","homepage":"","size":72566,"stargazers_count":20,"watchers_count":20,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":60,"forks":35,"open_issues":60,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/452"},"html":{"href":"https://github.com/fsr-itse/EvaP/pull/452"},"issue":{"href":"https://api.github.com/repos/fsr-itse/EvaP/issues/452"},"comments":{"href":"https://api.github.com/repos/fsr-itse/EvaP/issues/452/comments"},"review_comments":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/452/comments"},"review_comment":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/452/commits"},"statuses":{"href":"https://api.github.com/repos/fsr-itse/EvaP/statuses/659b619253d18fea5d7578b9781c02dd5fabce07"}}}}