GitHub PullRequestReviewCommentEvent at 2014-12-02 17:52:55
Repository: edx-platform
Actor: sarina
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/21176573","id":21176573,"diff_hunk":"@@ -0,0 +1,82 @@\n+\"\"\"\n+keyword_substitution.py\n+\n+Contains utility functions to help substitute keywords in a text body with\n+the appropriate user / course data.\n+\n+Supported:\n+    LMS:\n+        - %%USER_ID%% => anonymous user id\n+        - %%USER_FULLNAME%% => User's full name\n+        - %%COURSE_DISPLAY_NAME%% => display name of the course\n+        - %%COURSE_END_DATE%% => end date of the course\n+\n+Usage:\n+    KEYWORD_FUNCTION_MAP must be supplied in startup.py, so that it lives\n+    above other modules in the dependency tree and acts like a global var.\n+    Then we can call substitute_keywords_with_data where substitution is\n+    needed. Currently called in:\n+        - LMS: Announcements + Bulk emails\n+        - CMS: Not called","path":"common/djangoapps/util/keyword_substitution.py","position":20,"original_position":20,"commit_id":"69dc960760ec3613d44193bfa339526583d9079e","original_commit_id":"69dc960760ec3613d44193bfa339526583d9079e","user":{"login":"sarina","id":1985317,"avatar_url":"https://avatars.githubusercontent.com/u/1985317?v=3","gravatar_id":"","url":"https://api.github.com/users/sarina","html_url":"https://github.com/sarina","followers_url":"https://api.github.com/users/sarina/followers","following_url":"https://api.github.com/users/sarina/following{/other_user}","gists_url":"https://api.github.com/users/sarina/gists{/gist_id}","starred_url":"https://api.github.com/users/sarina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarina/subscriptions","organizations_url":"https://api.github.com/users/sarina/orgs","repos_url":"https://api.github.com/users/sarina/repos","events_url":"https://api.github.com/users/sarina/events{/privacy}","received_events_url":"https://api.github.com/users/sarina/received_events","type":"User","site_admin":false},"body":"This PR only focuses on bulk email, not yet on any HTML or course components (we requested the PR get split up and do just the bulk email functionality first).","created_at":"2014-12-02T17:52:55Z","updated_at":"2014-12-02T17:52:55Z","html_url":"https://github.com/edx/edx-platform/pull/5449#discussion_r21176573","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/5449","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/21176573"},"html":{"href":"https://github.com/edx/edx-platform/pull/5449#discussion_r21176573"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/5449"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/5449","id":22053719,"html_url":"https://github.com/edx/edx-platform/pull/5449","diff_url":"https://github.com/edx/edx-platform/pull/5449.diff","patch_url":"https://github.com/edx/edx-platform/pull/5449.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/5449","number":5449,"state":"open","locked":false,"title":"Implements keyword sub feature for bulk emails","user":{"login":"njdup","id":4758600,"avatar_url":"https://avatars.githubusercontent.com/u/4758600?v=3","gravatar_id":"","url":"https://api.github.com/users/njdup","html_url":"https://github.com/njdup","followers_url":"https://api.github.com/users/njdup/followers","following_url":"https://api.github.com/users/njdup/following{/other_user}","gists_url":"https://api.github.com/users/njdup/gists{/gist_id}","starred_url":"https://api.github.com/users/njdup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njdup/subscriptions","organizations_url":"https://api.github.com/users/njdup/orgs","repos_url":"https://api.github.com/users/njdup/repos","events_url":"https://api.github.com/users/njdup/events{/privacy}","received_events_url":"https://api.github.com/users/njdup/received_events","type":"User","site_admin":false},"body":"This commit pulls in changes from #4487 that implement keyword\r\nsubstitution for bulk emails. With these changes, an instructor can\r\ninclude keywords in their bulk emails which will be automatically substituted\r\nwith the corresponding value for the recipient of the email. Keywords are\r\nof the form %%keyword%%, and the keywords implemented in this commit include:\r\n\r\n%%USER_ID%% => anonymous_user_id\r\n%%USER_FULLNAME%% => user profile name\r\n%%COURSE_DISPLAY_NAME%% => display name of the course\r\n%%COURSE_END_DATE%% => end date of the course\r\n\r\nClient-side validations have also been implemented to ensure that only emails\r\nwith well-formed keywords can be sent.\r\nThe architecture is designed such that adding in new keywords in the future\r\nwould be relatively straight-forward.","created_at":"2014-10-01T06:23:36Z","updated_at":"2014-12-02T17:52:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa0e42752728b64a7b43455fcb682349192cc0f8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/5449/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/5449/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/{number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/5449/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/69dc960760ec3613d44193bfa339526583d9079e","head":{"label":"Stanford-Online:njdup/bulk_emails_keyword_sub","ref":"njdup/bulk_emails_keyword_sub","sha":"69dc960760ec3613d44193bfa339526583d9079e","user":{"login":"Stanford-Online","id":2159497,"avatar_url":"https://avatars.githubusercontent.com/u/2159497?v=3","gravatar_id":"","url":"https://api.github.com/users/Stanford-Online","html_url":"https://github.com/Stanford-Online","followers_url":"https://api.github.com/users/Stanford-Online/followers","following_url":"https://api.github.com/users/Stanford-Online/following{/other_user}","gists_url":"https://api.github.com/users/Stanford-Online/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanford-Online/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanford-Online/subscriptions","organizations_url":"https://api.github.com/users/Stanford-Online/orgs","repos_url":"https://api.github.com/users/Stanford-Online/repos","events_url":"https://api.github.com/users/Stanford-Online/events{/privacy}","received_events_url":"https://api.github.com/users/Stanford-Online/received_events","type":"Organization","site_admin":false},"repo":{"id":11616657,"name":"edx-platform","full_name":"Stanford-Online/edx-platform","owner":{"login":"Stanford-Online","id":2159497,"avatar_url":"https://avatars.githubusercontent.com/u/2159497?v=3","gravatar_id":"","url":"https://api.github.com/users/Stanford-Online","html_url":"https://github.com/Stanford-Online","followers_url":"https://api.github.com/users/Stanford-Online/followers","following_url":"https://api.github.com/users/Stanford-Online/following{/other_user}","gists_url":"https://api.github.com/users/Stanford-Online/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanford-Online/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanford-Online/subscriptions","organizations_url":"https://api.github.com/users/Stanford-Online/orgs","repos_url":"https://api.github.com/users/Stanford-Online/repos","events_url":"https://api.github.com/users/Stanford-Online/events{/privacy}","received_events_url":"https://api.github.com/users/Stanford-Online/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Stanford-Online/edx-platform","description":"the edX learning management system (LMS) and course authoring tool, Studio","fork":true,"url":"https://api.github.com/repos/Stanford-Online/edx-platform","forks_url":"https://api.github.com/repos/Stanford-Online/edx-platform/forks","keys_url":"https://api.github.com/repos/Stanford-Online/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Stanford-Online/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Stanford-Online/edx-platform/teams","hooks_url":"https://api.github.com/repos/Stanford-Online/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/Stanford-Online/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/Stanford-Online/edx-platform/events","assignees_url":"https://api.github.com/repos/Stanford-Online/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/Stanford-Online/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/Stanford-Online/edx-platform/tags","blobs_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Stanford-Online/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/Stanford-Online/edx-platform/languages","stargazers_url":"https://api.github.com/repos/Stanford-Online/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/Stanford-Online/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/Stanford-Online/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/Stanford-Online/edx-platform/subscription","commits_url":"https://api.github.com/repos/Stanford-Online/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/Stanford-Online/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/Stanford-Online/edx-platform/issues/comments/{number}","contents_url":"https://api.github.com/repos/Stanford-Online/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/Stanford-Online/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Stanford-Online/edx-platform/merges","archive_url":"https://api.github.com/repos/Stanford-Online/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Stanford-Online/edx-platform/downloads","issues_url":"https://api.github.com/repos/Stanford-Online/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/Stanford-Online/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/Stanford-Online/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Stanford-Online/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/Stanford-Online/edx-platform/releases{/id}","created_at":"2013-07-23T19:05:46Z","updated_at":"2014-12-01T19:52:42Z","pushed_at":"2014-12-02T03:56:23Z","git_url":"git://github.com/Stanford-Online/edx-platform.git","ssh_url":"git@github.com:Stanford-Online/edx-platform.git","clone_url":"https://github.com/Stanford-Online/edx-platform.git","svn_url":"https://github.com/Stanford-Online/edx-platform","homepage":"http://code.edx.org/","size":347824,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":49,"forks":3,"open_issues":49,"watchers":8,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"893cb9c21ab95d604be02da83b6b2b4286da58a4","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"Open edX, the edX platform that powers http://edx.org","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments/{number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","created_at":"2013-05-30T20:20:38Z","updated_at":"2014-12-02T16:11:15Z","pushed_at":"2014-12-02T17:51:01Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://openedx.org/","size":1517385,"stargazers_count":1576,"watchers_count":1576,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":920,"mirror_url":null,"open_issues_count":123,"forks":920,"open_issues":123,"watchers":1576,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/5449"},"html":{"href":"https://github.com/edx/edx-platform/pull/5449"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/5449"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/5449/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/5449/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/5449/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/69dc960760ec3613d44193bfa339526583d9079e"}}}}