{"action":"created","comment":{"url":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/comments/32220053","id":32220053,"diff_hunk":"@@ -119,3 +135,95 @@ def lti_redirect(request, course_id=None, unit_id=None):\n             return redirect(reverse(dispatch, args=(course_id, unit_id)))\n     else:\n         return redirect(reverse('ct:home'))\n+\n+\n+@login_required\n+@only_lti\n+def choice_course_source(request):\n+    \"\"\"Handler for ChoiceCourseForm\n+\n+    Make a choise to create new Course or\n+    merge content from existing one\n+    \"\"\"\n+    lti_post = request.session.get('LTI_POST')\n+    course_ref = CourseRef.objects.filter(\n+        context_id=pickle.loads(lti_post).get('context_id')\n+    ).first()\n+    if course_ref:\n+        return redirect(reverse('ct:home'))\n+\n+    parent_courseref = None","path":"mysite/lti/views.py","position":127,"original_position":127,"commit_id":"e5475cdd70ee0542d74a6769a14d5732390d6b6c","original_commit_id":"e5475cdd70ee0542d74a6769a14d5732390d6b6c","user":{"login":"auraz","id":67241,"avatar_url":"https://avatars.githubusercontent.com/u/67241?v=3","gravatar_id":"","url":"https://api.github.com/users/auraz","html_url":"https://github.com/auraz","followers_url":"https://api.github.com/users/auraz/followers","following_url":"https://api.github.com/users/auraz/following{/other_user}","gists_url":"https://api.github.com/users/auraz/gists{/gist_id}","starred_url":"https://api.github.com/users/auraz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auraz/subscriptions","organizations_url":"https://api.github.com/users/auraz/orgs","repos_url":"https://api.github.com/users/auraz/repos","events_url":"https://api.github.com/users/auraz/events{/privacy}","received_events_url":"https://api.github.com/users/auraz/received_events","type":"User","site_admin":false},"body":"Why we need it here?","created_at":"2015-06-11T13:33:05Z","updated_at":"2015-06-11T13:33:05Z","html_url":"https://github.com/raccoongang/socraticqs2/pull/1#discussion_r32220053","pull_request_url":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/comments/32220053"},"html":{"href":"https://github.com/raccoongang/socraticqs2/pull/1#discussion_r32220053"},"pull_request":{"href":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/1","id":37157979,"html_url":"https://github.com/raccoongang/socraticqs2/pull/1","diff_url":"https://github.com/raccoongang/socraticqs2/pull/1.diff","patch_url":"https://github.com/raccoongang/socraticqs2/pull/1.patch","issue_url":"https://api.github.com/repos/raccoongang/socraticqs2/issues/1","number":1,"state":"open","locked":false,"title":"Course creation PR to make a Code review","user":{"login":"maxsocl","id":877401,"avatar_url":"https://avatars.githubusercontent.com/u/877401?v=3","gravatar_id":"","url":"https://api.github.com/users/maxsocl","html_url":"https://github.com/maxsocl","followers_url":"https://api.github.com/users/maxsocl/followers","following_url":"https://api.github.com/users/maxsocl/following{/other_user}","gists_url":"https://api.github.com/users/maxsocl/gists{/gist_id}","starred_url":"https://api.github.com/users/maxsocl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxsocl/subscriptions","organizations_url":"https://api.github.com/users/maxsocl/orgs","repos_url":"https://api.github.com/users/maxsocl/repos","events_url":"https://api.github.com/users/maxsocl/events{/privacy}","received_events_url":"https://api.github.com/users/maxsocl/received_events","type":"User","site_admin":false},"body":"@auraz \r\n\r\nPR to add Course creation functionality.","created_at":"2015-06-08T14:20:48Z","updated_at":"2015-06-11T13:33:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc23c2dca8c2c0bec0c41431dbd66aa61778cc42","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/1/commits","review_comments_url":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/1/comments","review_comment_url":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/raccoongang/socraticqs2/issues/1/comments","statuses_url":"https://api.github.com/repos/raccoongang/socraticqs2/statuses/e5475cdd70ee0542d74a6769a14d5732390d6b6c","head":{"label":"raccoongang:course_creation","ref":"course_creation","sha":"e5475cdd70ee0542d74a6769a14d5732390d6b6c","user":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"repo":{"id":32084912,"name":"socraticqs2","full_name":"raccoongang/socraticqs2","owner":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/raccoongang/socraticqs2","description":"courselets.org web service implementation","fork":true,"url":"https://api.github.com/repos/raccoongang/socraticqs2","forks_url":"https://api.github.com/repos/raccoongang/socraticqs2/forks","keys_url":"https://api.github.com/repos/raccoongang/socraticqs2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raccoongang/socraticqs2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raccoongang/socraticqs2/teams","hooks_url":"https://api.github.com/repos/raccoongang/socraticqs2/hooks","issue_events_url":"https://api.github.com/repos/raccoongang/socraticqs2/issues/events{/number}","events_url":"https://api.github.com/repos/raccoongang/socraticqs2/events","assignees_url":"https://api.github.com/repos/raccoongang/socraticqs2/assignees{/user}","branches_url":"https://api.github.com/repos/raccoongang/socraticqs2/branches{/branch}","tags_url":"https://api.github.com/repos/raccoongang/socraticqs2/tags","blobs_url":"https://api.github.com/repos/raccoongang/socraticqs2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raccoongang/socraticqs2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raccoongang/socraticqs2/git/refs{/sha}","trees_url":"https://api.github.com/repos/raccoongang/socraticqs2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raccoongang/socraticqs2/statuses/{sha}","languages_url":"https://api.github.com/repos/raccoongang/socraticqs2/languages","stargazers_url":"https://api.github.com/repos/raccoongang/socraticqs2/stargazers","contributors_url":"https://api.github.com/repos/raccoongang/socraticqs2/contributors","subscribers_url":"https://api.github.com/repos/raccoongang/socraticqs2/subscribers","subscription_url":"https://api.github.com/repos/raccoongang/socraticqs2/subscription","commits_url":"https://api.github.com/repos/raccoongang/socraticqs2/commits{/sha}","git_commits_url":"https://api.github.com/repos/raccoongang/socraticqs2/git/commits{/sha}","comments_url":"https://api.github.com/repos/raccoongang/socraticqs2/comments{/number}","issue_comment_url":"https://api.github.com/repos/raccoongang/socraticqs2/issues/comments{/number}","contents_url":"https://api.github.com/repos/raccoongang/socraticqs2/contents/{+path}","compare_url":"https://api.github.com/repos/raccoongang/socraticqs2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raccoongang/socraticqs2/merges","archive_url":"https://api.github.com/repos/raccoongang/socraticqs2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raccoongang/socraticqs2/downloads","issues_url":"https://api.github.com/repos/raccoongang/socraticqs2/issues{/number}","pulls_url":"https://api.github.com/repos/raccoongang/socraticqs2/pulls{/number}","milestones_url":"https://api.github.com/repos/raccoongang/socraticqs2/milestones{/number}","notifications_url":"https://api.github.com/repos/raccoongang/socraticqs2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raccoongang/socraticqs2/labels{/name}","releases_url":"https://api.github.com/repos/raccoongang/socraticqs2/releases{/id}","created_at":"2015-03-12T15:34:25Z","updated_at":"2015-03-13T16:26:42Z","pushed_at":"2015-06-11T12:01:49Z","git_url":"git://github.com/raccoongang/socraticqs2.git","ssh_url":"git@github.com:raccoongang/socraticqs2.git","clone_url":"https://github.com/raccoongang/socraticqs2.git","svn_url":"https://github.com/raccoongang/socraticqs2","homepage":null,"size":1333,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"raccoongang:develop","ref":"develop","sha":"b027e045436ba50995ceae749a5562708942be6f","user":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"repo":{"id":32084912,"name":"socraticqs2","full_name":"raccoongang/socraticqs2","owner":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/raccoongang/socraticqs2","description":"courselets.org web service implementation","fork":true,"url":"https://api.github.com/repos/raccoongang/socraticqs2","forks_url":"https://api.github.com/repos/raccoongang/socraticqs2/forks","keys_url":"https://api.github.com/repos/raccoongang/socraticqs2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raccoongang/socraticqs2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raccoongang/socraticqs2/teams","hooks_url":"https://api.github.com/repos/raccoongang/socraticqs2/hooks","issue_events_url":"https://api.github.com/repos/raccoongang/socraticqs2/issues/events{/number}","events_url":"https://api.github.com/repos/raccoongang/socraticqs2/events","assignees_url":"https://api.github.com/repos/raccoongang/socraticqs2/assignees{/user}","branches_url":"https://api.github.com/repos/raccoongang/socraticqs2/branches{/branch}","tags_url":"https://api.github.com/repos/raccoongang/socraticqs2/tags","blobs_url":"https://api.github.com/repos/raccoongang/socraticqs2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raccoongang/socraticqs2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raccoongang/socraticqs2/git/refs{/sha}","trees_url":"https://api.github.com/repos/raccoongang/socraticqs2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raccoongang/socraticqs2/statuses/{sha}","languages_url":"https://api.github.com/repos/raccoongang/socraticqs2/languages","stargazers_url":"https://api.github.com/repos/raccoongang/socraticqs2/stargazers","contributors_url":"https://api.github.com/repos/raccoongang/socraticqs2/contributors","subscribers_url":"https://api.github.com/repos/raccoongang/socraticqs2/subscribers","subscription_url":"https://api.github.com/repos/raccoongang/socraticqs2/subscription","commits_url":"https://api.github.com/repos/raccoongang/socraticqs2/commits{/sha}","git_commits_url":"https://api.github.com/repos/raccoongang/socraticqs2/git/commits{/sha}","comments_url":"https://api.github.com/repos/raccoongang/socraticqs2/comments{/number}","issue_comment_url":"https://api.github.com/repos/raccoongang/socraticqs2/issues/comments{/number}","contents_url":"https://api.github.com/repos/raccoongang/socraticqs2/contents/{+path}","compare_url":"https://api.github.com/repos/raccoongang/socraticqs2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raccoongang/socraticqs2/merges","archive_url":"https://api.github.com/repos/raccoongang/socraticqs2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raccoongang/socraticqs2/downloads","issues_url":"https://api.github.com/repos/raccoongang/socraticqs2/issues{/number}","pulls_url":"https://api.github.com/repos/raccoongang/socraticqs2/pulls{/number}","milestones_url":"https://api.github.com/repos/raccoongang/socraticqs2/milestones{/number}","notifications_url":"https://api.github.com/repos/raccoongang/socraticqs2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raccoongang/socraticqs2/labels{/name}","releases_url":"https://api.github.com/repos/raccoongang/socraticqs2/releases{/id}","created_at":"2015-03-12T15:34:25Z","updated_at":"2015-03-13T16:26:42Z","pushed_at":"2015-06-11T12:01:49Z","git_url":"git://github.com/raccoongang/socraticqs2.git","ssh_url":"git@github.com:raccoongang/socraticqs2.git","clone_url":"https://github.com/raccoongang/socraticqs2.git","svn_url":"https://github.com/raccoongang/socraticqs2","homepage":null,"size":1333,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/1"},"html":{"href":"https://github.com/raccoongang/socraticqs2/pull/1"},"issue":{"href":"https://api.github.com/repos/raccoongang/socraticqs2/issues/1"},"comments":{"href":"https://api.github.com/repos/raccoongang/socraticqs2/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/raccoongang/socraticqs2/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/raccoongang/socraticqs2/statuses/e5475cdd70ee0542d74a6769a14d5732390d6b6c"}}}}