{"action":"created","comment":{"url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/comments/38964914","id":38964914,"diff_hunk":"@@ -90,7 +133,9 @@ def get_or_create_or_delete_mailing_lists_for_canvas_course_id(self, canvas_cour\n \n         # Delete existing mailing lists who's section no longer exists\n         for section_id, mailing_list in mailing_lists_by_section_id.iteritems():\n-            mailing_list.delete()\n+            # we don't want to delete the course list here\n+            if section_id:","path":"mailing_list/models.py","position":86,"original_position":86,"commit_id":"b46f206d6918bc3c550745c6e7565babc37aac70","original_commit_id":"b46f206d6918bc3c550745c6e7565babc37aac70","user":{"login":"douglashall","id":224634,"avatar_url":"https://avatars.githubusercontent.com/u/224634?v=3","gravatar_id":"","url":"https://api.github.com/users/douglashall","html_url":"https://github.com/douglashall","followers_url":"https://api.github.com/users/douglashall/followers","following_url":"https://api.github.com/users/douglashall/following{/other_user}","gists_url":"https://api.github.com/users/douglashall/gists{/gist_id}","starred_url":"https://api.github.com/users/douglashall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douglashall/subscriptions","organizations_url":"https://api.github.com/users/douglashall/orgs","repos_url":"https://api.github.com/users/douglashall/repos","events_url":"https://api.github.com/users/douglashall/events{/privacy}","received_events_url":"https://api.github.com/users/douglashall/received_events","type":"User","site_admin":false},"body":"You won't need this anymore if you pop the course list as described in the change above.","created_at":"2015-09-08T18:52:32Z","updated_at":"2015-09-08T18:52:32Z","html_url":"https://github.com/Harvard-University-iCommons/lti_emailer/pull/84#discussion_r38964914","pull_request_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/84","_links":{"self":{"href":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/comments/38964914"},"html":{"href":"https://github.com/Harvard-University-iCommons/lti_emailer/pull/84#discussion_r38964914"},"pull_request":{"href":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/84"}}},"pull_request":{"url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/84","id":44385362,"html_url":"https://github.com/Harvard-University-iCommons/lti_emailer/pull/84","diff_url":"https://github.com/Harvard-University-iCommons/lti_emailer/pull/84.diff","patch_url":"https://github.com/Harvard-University-iCommons/lti_emailer/pull/84.patch","issue_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/issues/84","number":84,"state":"open","locked":false,"title":"Task/eparker71/tlt 1885 merge list for cross listed courses","user":{"login":"eparker71","id":1084287,"avatar_url":"https://avatars.githubusercontent.com/u/1084287?v=3","gravatar_id":"","url":"https://api.github.com/users/eparker71","html_url":"https://github.com/eparker71","followers_url":"https://api.github.com/users/eparker71/followers","following_url":"https://api.github.com/users/eparker71/following{/other_user}","gists_url":"https://api.github.com/users/eparker71/gists{/gist_id}","starred_url":"https://api.github.com/users/eparker71/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eparker71/subscriptions","organizations_url":"https://api.github.com/users/eparker71/orgs","repos_url":"https://api.github.com/users/eparker71/repos","events_url":"https://api.github.com/users/eparker71/events{/privacy}","received_events_url":"https://api.github.com/users/eparker71/received_events","type":"User","site_admin":false},"body":"Jira ticket: https://jira.huit.harvard.edu/browse/TLT-1885\r\n\r\n1) Create new mailing list for courses with multiple primary sections:\r\n\r\nThis PR has code that checks to see if the course has multiple primary sections. If this is true, it creates a new mailing list (in the postgres db for the mailer only) to be a master list which includes all the enrollments for the course. The meat of this change is in the mailing_list.model file and the subsequent migration to modify the section id field. Changing the field type from int to char resulted in many little code changes to accommodate the new type. \r\n\r\nThe email address of the new address is different that the other section addresses. it only contains the \r\ncourse id (canvas-{canvas_course_id}@) vs (canvas-{canvas_course_id}-{section_id}@)\r\n\r\n2) UI enhancements:\r\n\r\nThis PR also contains UI changes. See the wiki page for more info, mock ups and text:\r\nhttps://wiki.harvard.edu/confluence/pages/viewpage.action?title=Course+Emailer+-+TLT-1885&spaceKey=UIS\r\n\r\nincludes modifications to angular and templates\r\n\r\n3) Other changes/updates:\r\n\r\nfixed unit tests and added new test. All tests run.\r\n\r\nThis commit also exposes port 5432 in Vagrant which allows us to access the postgres database with apps like Portico.\r\n\r\nTesting:\r\n\r\nI have tested this code with both courses that have multiple primary sections, courses with one primary section, and a course with no primary sections. \r\nHere are the courses I used for testing:\r\nhttps://canvas.icommons.harvard.edu/courses/5980/external_tools/1685\r\nhttps://canvas.icommons.harvard.edu/courses/6020/external_tools/1684\r\nhttps://canvas.icommons.harvard.edu/courses/5958/external_tools/1685\r\n\r\n","created_at":"2015-09-08T01:15:08Z","updated_at":"2015-09-08T18:52:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7992fd556cbc897c772b5f85c9424aba1d9ffb7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/84/commits","review_comments_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/84/comments","review_comment_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/issues/84/comments","statuses_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/statuses/b46f206d6918bc3c550745c6e7565babc37aac70","head":{"label":"Harvard-University-iCommons:task/eparker71/TLT-1885-merge-list-for-cross-listed-courses","ref":"task/eparker71/TLT-1885-merge-list-for-cross-listed-courses","sha":"b46f206d6918bc3c550745c6e7565babc37aac70","user":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"repo":{"id":33729277,"name":"lti_emailer","full_name":"Harvard-University-iCommons/lti_emailer","owner":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Harvard-University-iCommons/lti_emailer","description":"","fork":false,"url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer","forks_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/forks","keys_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/teams","hooks_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/hooks","issue_events_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/issues/events{/number}","events_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/events","assignees_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/assignees{/user}","branches_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/branches{/branch}","tags_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/tags","blobs_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/statuses/{sha}","languages_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/languages","stargazers_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/stargazers","contributors_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/contributors","subscribers_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/subscribers","subscription_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/subscription","commits_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/contents/{+path}","compare_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/merges","archive_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/downloads","issues_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/issues{/number}","pulls_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls{/number}","milestones_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/milestones{/number}","notifications_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/labels{/name}","releases_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/releases{/id}","created_at":"2015-04-10T13:16:08Z","updated_at":"2015-05-08T13:18:00Z","pushed_at":"2015-09-08T18:23:48Z","git_url":"git://github.com/Harvard-University-iCommons/lti_emailer.git","ssh_url":"git@github.com:Harvard-University-iCommons/lti_emailer.git","clone_url":"https://github.com/Harvard-University-iCommons/lti_emailer.git","svn_url":"https://github.com/Harvard-University-iCommons/lti_emailer","homepage":null,"size":1756,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"develop"}},"base":{"label":"Harvard-University-iCommons:develop","ref":"develop","sha":"f2aff307b6714ee324652dcece8c6f632d701691","user":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"repo":{"id":33729277,"name":"lti_emailer","full_name":"Harvard-University-iCommons/lti_emailer","owner":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Harvard-University-iCommons/lti_emailer","description":"","fork":false,"url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer","forks_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/forks","keys_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/teams","hooks_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/hooks","issue_events_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/issues/events{/number}","events_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/events","assignees_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/assignees{/user}","branches_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/branches{/branch}","tags_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/tags","blobs_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/statuses/{sha}","languages_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/languages","stargazers_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/stargazers","contributors_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/contributors","subscribers_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/subscribers","subscription_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/subscription","commits_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/contents/{+path}","compare_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/merges","archive_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/downloads","issues_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/issues{/number}","pulls_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls{/number}","milestones_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/milestones{/number}","notifications_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/labels{/name}","releases_url":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/releases{/id}","created_at":"2015-04-10T13:16:08Z","updated_at":"2015-05-08T13:18:00Z","pushed_at":"2015-09-08T18:23:48Z","git_url":"git://github.com/Harvard-University-iCommons/lti_emailer.git","ssh_url":"git@github.com:Harvard-University-iCommons/lti_emailer.git","clone_url":"https://github.com/Harvard-University-iCommons/lti_emailer.git","svn_url":"https://github.com/Harvard-University-iCommons/lti_emailer","homepage":null,"size":1756,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/84"},"html":{"href":"https://github.com/Harvard-University-iCommons/lti_emailer/pull/84"},"issue":{"href":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/issues/84"},"comments":{"href":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/issues/84/comments"},"review_comments":{"href":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/84/comments"},"review_comment":{"href":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/pulls/84/commits"},"statuses":{"href":"https://api.github.com/repos/Harvard-University-iCommons/lti_emailer/statuses/b46f206d6918bc3c550745c6e7565babc37aac70"}}}}