{"action":"created","comment":{"url":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/comments/136667604","pull_request_review_id":60243608,"id":136667604,"diff_hunk":"@@ -103,12 +228,122 @@ def get(self, request):\n \n \n class CompletionDetailView(APIView, CompletionViewMixin):\n+    # pylint: disable=line-too-long\n     \"\"\"\n-    API view to render serialized CourseCompletions.\n+    API view to render a serialized CourseCompletion for a single user in a\n+    single course.\n+\n+    **Request Format**\n+\n+        GET /api/completion/v0/course/<course_key>/\n+\n+    **Example Requests**\n+\n+        GET /api/completion/v0/course/course-v1:GeorgetownX+HUMX421-02x+1T2016/\n+        GET /api/completion/v0/course/course-v1:edX+DemoCourse+Demo2017/?requested_fields=chapter,vertical\n+\n+    **Response Values**\n+\n+        Standard fields:\n+\n+        * course_key (CourseKey): The unique course identifier.\n+        * completion: A dictionary comprising of the following fields:\n+            * earned (float): The sum of the learner's completions.\n+            * possible (float): The total number of completions available\n+              in the course.\n+            * ratio (float in the range [0.0, 1.0]): The ratio of earned\n+              completions to possible completions in the course.\n+\n+        Optional fields:\n+\n+        * If \"requested_fields\" is specified, the response will include data\n+          for specific block types.  The fields available are configurable, but\n+          may include `chapter`, `sequential`, or `vertical`.  If requested,\n+          the block type will be present as another field in the response.\n+          Inside the field will be a list of all blocks of that type containing\n+          completion information for that block.  Fields for each entry will\n+          include:\n+\n+              * course_key (CourseKey): The unique course identifier.\n+              * usage_key: (UsageKey) The unique block identifier.\n+              * completion: A dictionary comprising the following fields.\n+                  * earned (float): The sum of the learner's completions.\n+                  * possible (float): The total number of completions\n+                    available within the identified block.\n+                  * ratio (float in the range [0.0, 1.0]): The ratio of earned\n+                    completions to possible completions within the identified\n+                    block.\n+\n+    **Parameters**\n+\n+        username (optional):\n+            The username of the specified user for whome the course data","path":"lms/djangoapps/completion_api/views.py","position":62,"original_position":204,"commit_id":"90a6a95da756e745f3537ce1a54f098e72c1aafc","original_commit_id":"90a6a95da756e745f3537ce1a54f098e72c1aafc","user":{"login":"bradenmacdonald","id":945577,"avatar_url":"https://avatars2.githubusercontent.com/u/945577?v=4","gravatar_id":"","url":"https://api.github.com/users/bradenmacdonald","html_url":"https://github.com/bradenmacdonald","followers_url":"https://api.github.com/users/bradenmacdonald/followers","following_url":"https://api.github.com/users/bradenmacdonald/following{/other_user}","gists_url":"https://api.github.com/users/bradenmacdonald/gists{/gist_id}","starred_url":"https://api.github.com/users/bradenmacdonald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradenmacdonald/subscriptions","organizations_url":"https://api.github.com/users/bradenmacdonald/orgs","repos_url":"https://api.github.com/users/bradenmacdonald/repos","events_url":"https://api.github.com/users/bradenmacdonald/events{/privacy}","received_events_url":"https://api.github.com/users/bradenmacdonald/received_events","type":"User","site_admin":false},"body":"Typo: `whome`","created_at":"2017-09-01T21:21:13Z","updated_at":"2017-09-01T21:48:25Z","html_url":"https://github.com/edx-solutions/edx-platform/pull/857#discussion_r136667604","pull_request_url":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/857","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/comments/136667604"},"html":{"href":"https://github.com/edx-solutions/edx-platform/pull/857#discussion_r136667604"},"pull_request":{"href":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/857"}}},"pull_request":{"url":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/857","id":138501070,"html_url":"https://github.com/edx-solutions/edx-platform/pull/857","diff_url":"https://github.com/edx-solutions/edx-platform/pull/857.diff","patch_url":"https://github.com/edx-solutions/edx-platform/pull/857.patch","issue_url":"https://api.github.com/repos/edx-solutions/edx-platform/issues/857","number":857,"state":"open","locked":false,"title":"completion summary","user":{"login":"jcdyer","id":77486,"avatar_url":"https://avatars0.githubusercontent.com/u/77486?v=4","gravatar_id":"","url":"https://api.github.com/users/jcdyer","html_url":"https://github.com/jcdyer","followers_url":"https://api.github.com/users/jcdyer/followers","following_url":"https://api.github.com/users/jcdyer/following{/other_user}","gists_url":"https://api.github.com/users/jcdyer/gists{/gist_id}","starred_url":"https://api.github.com/users/jcdyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcdyer/subscriptions","organizations_url":"https://api.github.com/users/jcdyer/orgs","repos_url":"https://api.github.com/users/jcdyer/repos","events_url":"https://api.github.com/users/jcdyer/events{/privacy}","received_events_url":"https://api.github.com/users/jcdyer/received_events","type":"User","site_admin":false},"body":"# [OC-3021](https://tasks.opencraft.com/browse/OC-3021)\r\n\r\nImplement an API view that returns the average completion for a course.\r\n\r\n## Reviewers\r\n\r\n- [ ] @bradenmacdonald \r\n\r\n## TODO:\r\n\r\n- [x] Merge #839\r\n- [ ] Rebase against new edx-solutions master","created_at":"2017-08-30T18:51:22Z","updated_at":"2017-09-01T21:48:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c2af8f8a3c9adc491d2449980a442b54dab6645","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/857/commits","review_comments_url":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/857/comments","review_comment_url":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx-solutions/edx-platform/issues/857/comments","statuses_url":"https://api.github.com/repos/edx-solutions/edx-platform/statuses/90a6a95da756e745f3537ce1a54f098e72c1aafc","head":{"label":"open-craft:cliff/completion-summary","ref":"cliff/completion-summary","sha":"90a6a95da756e745f3537ce1a54f098e72c1aafc","user":{"login":"open-craft","id":7414786,"avatar_url":"https://avatars0.githubusercontent.com/u/7414786?v=4","gravatar_id":"","url":"https://api.github.com/users/open-craft","html_url":"https://github.com/open-craft","followers_url":"https://api.github.com/users/open-craft/followers","following_url":"https://api.github.com/users/open-craft/following{/other_user}","gists_url":"https://api.github.com/users/open-craft/gists{/gist_id}","starred_url":"https://api.github.com/users/open-craft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-craft/subscriptions","organizations_url":"https://api.github.com/users/open-craft/orgs","repos_url":"https://api.github.com/users/open-craft/repos","events_url":"https://api.github.com/users/open-craft/events{/privacy}","received_events_url":"https://api.github.com/users/open-craft/received_events","type":"Organization","site_admin":false},"repo":{"id":19940883,"name":"edx-platform","full_name":"open-craft/edx-platform","owner":{"login":"open-craft","id":7414786,"avatar_url":"https://avatars0.githubusercontent.com/u/7414786?v=4","gravatar_id":"","url":"https://api.github.com/users/open-craft","html_url":"https://github.com/open-craft","followers_url":"https://api.github.com/users/open-craft/followers","following_url":"https://api.github.com/users/open-craft/following{/other_user}","gists_url":"https://api.github.com/users/open-craft/gists{/gist_id}","starred_url":"https://api.github.com/users/open-craft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-craft/subscriptions","organizations_url":"https://api.github.com/users/open-craft/orgs","repos_url":"https://api.github.com/users/open-craft/repos","events_url":"https://api.github.com/users/open-craft/events{/privacy}","received_events_url":"https://api.github.com/users/open-craft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/open-craft/edx-platform","description":"the edX learning management system (LMS) and course authoring tool, Studio","fork":true,"url":"https://api.github.com/repos/open-craft/edx-platform","forks_url":"https://api.github.com/repos/open-craft/edx-platform/forks","keys_url":"https://api.github.com/repos/open-craft/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/open-craft/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/open-craft/edx-platform/teams","hooks_url":"https://api.github.com/repos/open-craft/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/open-craft/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/open-craft/edx-platform/events","assignees_url":"https://api.github.com/repos/open-craft/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/open-craft/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/open-craft/edx-platform/tags","blobs_url":"https://api.github.com/repos/open-craft/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/open-craft/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/open-craft/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/open-craft/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/open-craft/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/open-craft/edx-platform/languages","stargazers_url":"https://api.github.com/repos/open-craft/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/open-craft/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/open-craft/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/open-craft/edx-platform/subscription","commits_url":"https://api.github.com/repos/open-craft/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/open-craft/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/open-craft/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/open-craft/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/open-craft/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/open-craft/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/open-craft/edx-platform/merges","archive_url":"https://api.github.com/repos/open-craft/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/open-craft/edx-platform/downloads","issues_url":"https://api.github.com/repos/open-craft/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/open-craft/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/open-craft/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/open-craft/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/open-craft/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/open-craft/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/open-craft/edx-platform/deployments","created_at":"2014-05-19T12:28:25Z","updated_at":"2017-08-14T18:35:23Z","pushed_at":"2017-09-01T18:04:38Z","git_url":"git://github.com/open-craft/edx-platform.git","ssh_url":"git@github.com:open-craft/edx-platform.git","clone_url":"https://github.com/open-craft/edx-platform.git","svn_url":"https://github.com/open-craft/edx-platform","homepage":"http://code.edx.org/","size":846949,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":3,"default_branch":"open-craft-notice"}},"base":{"label":"edx-solutions:master","ref":"master","sha":"fb41e1348e405fe782a2ff2fb252d0b661e7163d","user":{"login":"edx-solutions","id":6585054,"avatar_url":"https://avatars3.githubusercontent.com/u/6585054?v=4","gravatar_id":"","url":"https://api.github.com/users/edx-solutions","html_url":"https://github.com/edx-solutions","followers_url":"https://api.github.com/users/edx-solutions/followers","following_url":"https://api.github.com/users/edx-solutions/following{/other_user}","gists_url":"https://api.github.com/users/edx-solutions/gists{/gist_id}","starred_url":"https://api.github.com/users/edx-solutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx-solutions/subscriptions","organizations_url":"https://api.github.com/users/edx-solutions/orgs","repos_url":"https://api.github.com/users/edx-solutions/repos","events_url":"https://api.github.com/users/edx-solutions/events{/privacy}","received_events_url":"https://api.github.com/users/edx-solutions/received_events","type":"Organization","site_admin":false},"repo":{"id":16513414,"name":"edx-platform","full_name":"edx-solutions/edx-platform","owner":{"login":"edx-solutions","id":6585054,"avatar_url":"https://avatars3.githubusercontent.com/u/6585054?v=4","gravatar_id":"","url":"https://api.github.com/users/edx-solutions","html_url":"https://github.com/edx-solutions","followers_url":"https://api.github.com/users/edx-solutions/followers","following_url":"https://api.github.com/users/edx-solutions/following{/other_user}","gists_url":"https://api.github.com/users/edx-solutions/gists{/gist_id}","starred_url":"https://api.github.com/users/edx-solutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx-solutions/subscriptions","organizations_url":"https://api.github.com/users/edx-solutions/orgs","repos_url":"https://api.github.com/users/edx-solutions/repos","events_url":"https://api.github.com/users/edx-solutions/events{/privacy}","received_events_url":"https://api.github.com/users/edx-solutions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx-solutions/edx-platform","description":"the edX learning management system (LMS) and course authoring tool, Studio","fork":true,"url":"https://api.github.com/repos/edx-solutions/edx-platform","forks_url":"https://api.github.com/repos/edx-solutions/edx-platform/forks","keys_url":"https://api.github.com/repos/edx-solutions/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx-solutions/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx-solutions/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx-solutions/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx-solutions/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx-solutions/edx-platform/events","assignees_url":"https://api.github.com/repos/edx-solutions/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx-solutions/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx-solutions/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx-solutions/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx-solutions/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx-solutions/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx-solutions/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx-solutions/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx-solutions/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx-solutions/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx-solutions/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx-solutions/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx-solutions/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx-solutions/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx-solutions/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx-solutions/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx-solutions/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx-solutions/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx-solutions/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx-solutions/edx-platform/merges","archive_url":"https://api.github.com/repos/edx-solutions/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx-solutions/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx-solutions/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx-solutions/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx-solutions/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx-solutions/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx-solutions/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx-solutions/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/edx-solutions/edx-platform/deployments","created_at":"2014-02-04T14:02:57Z","updated_at":"2017-05-25T18:11:35Z","pushed_at":"2017-09-01T18:11:11Z","git_url":"git://github.com/edx-solutions/edx-platform.git","ssh_url":"git@github.com:edx-solutions/edx-platform.git","clone_url":"https://github.com/edx-solutions/edx-platform.git","svn_url":"https://github.com/edx-solutions/edx-platform","homepage":"http://code.edx.org/","size":852640,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/857"},"html":{"href":"https://github.com/edx-solutions/edx-platform/pull/857"},"issue":{"href":"https://api.github.com/repos/edx-solutions/edx-platform/issues/857"},"comments":{"href":"https://api.github.com/repos/edx-solutions/edx-platform/issues/857/comments"},"review_comments":{"href":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/857/comments"},"review_comment":{"href":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx-solutions/edx-platform/pulls/857/commits"},"statuses":{"href":"https://api.github.com/repos/edx-solutions/edx-platform/statuses/90a6a95da756e745f3537ce1a54f098e72c1aafc"}},"author_association":"NONE"}}
{"actor":{"display_login":"bradenmacdonald"}}