{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/71884309","id":71884309,"diff_hunk":"@@ -0,0 +1,31 @@\n+\"\"\"\n+Utility methods related to course\n+\"\"\"\n+import logging\n+from django.conf import settings\n+\n+from opaque_keys.edx.keys import CourseKey\n+import re\n+\n+log = logging.getLogger(__name__)\n+\n+\n+def get_lms_link_for_about_page(course_key):\n+    \"\"\"\n+    Returns the url to the course about page from the location tuple.\n+    \"\"\"\n+    assert isinstance(course_key, CourseKey)\n+\n+    if settings.FEATURES.get('ENABLE_MKTG_SITE', False):\n+        # Root will be \"https://www.edx.org\". The complete URL will still not be exactly correct,\n+        # but redirects exist from www.edx.org to get to the Drupal course about page URL.\n+        about_base = settings.MKTG_URLS.get('ROOT')\n+    else:\n+        about_base = settings.ENV_TOKENS.get('LMS_BASE')\n+\n+    # Strip off https:// (or http://) to be consistent with the formatting of LMS_BASE.\n+    about_base = re.sub(r\"^https?://\", \"\", about_base)\n+    return u\"https://{about_base_url}/courses/{course_key}/about\".format(","path":"common/djangoapps/util/course.py","position":28,"original_position":28,"commit_id":"0aa6a370873a7f159a97651ba7a4497eaed347cb","original_commit_id":"a6b55ac7a0281c49c799caa279e8726aaded59b5","user":{"login":"cpennington","id":30236,"avatar_url":"https://avatars.githubusercontent.com/u/30236?v=3","gravatar_id":"","url":"https://api.github.com/users/cpennington","html_url":"https://github.com/cpennington","followers_url":"https://api.github.com/users/cpennington/followers","following_url":"https://api.github.com/users/cpennington/following{/other_user}","gists_url":"https://api.github.com/users/cpennington/gists{/gist_id}","starred_url":"https://api.github.com/users/cpennington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpennington/subscriptions","organizations_url":"https://api.github.com/users/cpennington/orgs","repos_url":"https://api.github.com/users/cpennington/repos","events_url":"https://api.github.com/users/cpennington/events{/privacy}","received_events_url":"https://api.github.com/users/cpennington/received_events","type":"User","site_admin":false},"body":"It looks like @cahrens made that change in the annals of history: https://github.com/edx/edx-platform/commit/c715edf57a6b76c127939e4fc2759cf1ab045cd3\r\n\r\nI think removing the stripping is the right thing to do.","created_at":"2016-07-22T14:10:22Z","updated_at":"2016-07-22T14:10:22Z","html_url":"https://github.com/edx/edx-platform/pull/12818#discussion_r71884309","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/12818","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/71884309"},"html":{"href":"https://github.com/edx/edx-platform/pull/12818#discussion_r71884309"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/12818"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/12818","id":74742072,"html_url":"https://github.com/edx/edx-platform/pull/12818","diff_url":"https://github.com/edx/edx-platform/pull/12818.diff","patch_url":"https://github.com/edx/edx-platform/pull/12818.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/12818","number":12818,"state":"open","locked":false,"title":"MA-2536: get 'course_about' url in enrollment","user":{"login":"wajeeha-khalid","id":6745069,"avatar_url":"https://avatars.githubusercontent.com/u/6745069?v=3","gravatar_id":"","url":"https://api.github.com/users/wajeeha-khalid","html_url":"https://github.com/wajeeha-khalid","followers_url":"https://api.github.com/users/wajeeha-khalid/followers","following_url":"https://api.github.com/users/wajeeha-khalid/following{/other_user}","gists_url":"https://api.github.com/users/wajeeha-khalid/gists{/gist_id}","starred_url":"https://api.github.com/users/wajeeha-khalid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wajeeha-khalid/subscriptions","organizations_url":"https://api.github.com/users/wajeeha-khalid/orgs","repos_url":"https://api.github.com/users/wajeeha-khalid/repos","events_url":"https://api.github.com/users/wajeeha-khalid/events{/privacy}","received_events_url":"https://api.github.com/users/wajeeha-khalid/received_events","type":"User","site_admin":false},"body":"### Description\r\n \r\n[MA-2536](https://openedx.atlassian.net/browse/MA-2536)\r\n\r\nGet 'course_about' url of marketing site in course enrollment.\r\nRefactored cms utility of evaluating course_about url to be used by both cms and lms; moved to common utilities.\r\n\r\n### Sandbox\r\n- [x] https://jia-course-about.sandbox.edx.org/\r\n\r\n### Testing\r\n- [x] Unit\r\n\r\n### Reviewers\r\nIf you've been tagged for review, please check your corresponding box once you've given the :+1:.\r\n- [ ] Code review: @verdanmahmood \r\n- [ ] Code review: @jcdyer \r\n\r\n### Post-review\r\n- [ ] Ensure https://github.com/edx/configuration/pull/3256 has merged\r\n- [ ] Squash commits","created_at":"2016-06-22T08:22:38Z","updated_at":"2016-07-22T14:10:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"630daf313ec4c6d787d1646ca78bea200087df10","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/12818/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/12818/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/12818/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/0aa6a370873a7f159a97651ba7a4497eaed347cb","head":{"label":"edx:jia/MA-2536","ref":"jia/MA-2536","sha":"0aa6a370873a7f159a97651ba7a4497eaed347cb","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":"The Open edX platform, the software that powers edX!","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}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-07-21T23:05:12Z","pushed_at":"2016-07-22T14:10:16Z","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://open.edx.org/","size":799188,"stargazers_count":2680,"watchers_count":2680,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1618,"mirror_url":null,"open_issues_count":190,"forks":1618,"open_issues":190,"watchers":2680,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"bfae8206fff500ce5120b8bec42d59073468a54a","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":"The Open edX platform, the software that powers edX!","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}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-07-21T23:05:12Z","pushed_at":"2016-07-22T14:10:16Z","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://open.edx.org/","size":799188,"stargazers_count":2680,"watchers_count":2680,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1618,"mirror_url":null,"open_issues_count":190,"forks":1618,"open_issues":190,"watchers":2680,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/12818"},"html":{"href":"https://github.com/edx/edx-platform/pull/12818"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/12818"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/12818/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/12818/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/12818/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/0aa6a370873a7f159a97651ba7a4497eaed347cb"}}}}
{"actor":{"display_login":"cpennington"}}