{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/31330941","id":31330941,"diff_hunk":"@@ -175,8 +181,31 @@ def index_item(item, skip_index=False, groups_usage_info=None):\n                 return\n \n             item_content_groups = None\n+\n+            if item.category == \"split_test\":\n+                user_partitions = item.user_partitions\n+                split_partitions = []\n+                if user_partitions:\n+                    for user_partition in user_partitions:\n+                        if user_partition.scheme.name == RANDOM_SCHEME:\n+                            split_partitions.append(user_partition)\n+                for vertical in item.get_children():\n+                    if split_partitions:\n+                        for user_partition in split_partitions:\n+                            for group in user_partition.groups:\n+                                group_id = unicode(group.id)\n+                                child_location = item.group_id_to_child.get(group_id, None)","path":"cms/djangoapps/contentstore/courseware_index.py","position":39,"original_position":39,"commit_id":"766f7ecc4c98834218cf0ea05768769d5b3c4f31","original_commit_id":"7587fe2bb24a117cbb77eaf57ad326511bc1147a","user":{"login":"andy-armstrong","id":5985072,"avatar_url":"https://avatars.githubusercontent.com/u/5985072?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-armstrong","html_url":"https://github.com/andy-armstrong","followers_url":"https://api.github.com/users/andy-armstrong/followers","following_url":"https://api.github.com/users/andy-armstrong/following{/other_user}","gists_url":"https://api.github.com/users/andy-armstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-armstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-armstrong/subscriptions","organizations_url":"https://api.github.com/users/andy-armstrong/orgs","repos_url":"https://api.github.com/users/andy-armstrong/repos","events_url":"https://api.github.com/users/andy-armstrong/events{/privacy}","received_events_url":"https://api.github.com/users/andy-armstrong/received_events","type":"User","site_admin":false},"body":"Sorry for all the typos here. As I said in my previous reply, you already have a descriptor, so you should be able to use the methods on it directly.","created_at":"2015-05-29T14:46:27Z","updated_at":"2015-05-29T14:46:27Z","html_url":"https://github.com/edx/edx-platform/pull/8229#discussion_r31330941","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/8229","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/31330941"},"html":{"href":"https://github.com/edx/edx-platform/pull/8229#discussion_r31330941"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/8229"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/8229","id":36396229,"html_url":"https://github.com/edx/edx-platform/pull/8229","diff_url":"https://github.com/edx/edx-platform/pull/8229.diff","patch_url":"https://github.com/edx/edx-platform/pull/8229.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/8229","number":8229,"state":"open","locked":false,"title":"Dcikatic/sol 536 [WIP]","user":{"login":"dino-cikatic","id":7403820,"avatar_url":"https://avatars.githubusercontent.com/u/7403820?v=3","gravatar_id":"","url":"https://api.github.com/users/dino-cikatic","html_url":"https://github.com/dino-cikatic","followers_url":"https://api.github.com/users/dino-cikatic/followers","following_url":"https://api.github.com/users/dino-cikatic/following{/other_user}","gists_url":"https://api.github.com/users/dino-cikatic/gists{/gist_id}","starred_url":"https://api.github.com/users/dino-cikatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dino-cikatic/subscriptions","organizations_url":"https://api.github.com/users/dino-cikatic/orgs","repos_url":"https://api.github.com/users/dino-cikatic/repos","events_url":"https://api.github.com/users/dino-cikatic/events{/privacy}","received_events_url":"https://api.github.com/users/dino-cikatic/received_events","type":"User","site_admin":false},"body":"@martynjames @marjev I've merged your work into this PR. I've tried testing with different state accounts and it looks fine. My only concern is that we have to get whole course object for each enrolled course and filter it for content groups. I imagine these can get to double digits fairly easily.\r\n\r\nTicket with acceptance criteria: https://openedx.atlassian.net/browse/SOL-536","created_at":"2015-05-28T11:21:13Z","updated_at":"2015-05-29T14:46:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64abee31d0e763a6df8c1d96ae17164738fa9ba7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/8229/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/8229/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/8229/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/766f7ecc4c98834218cf0ea05768769d5b3c4f31","head":{"label":"edx:dcikatic/SOL-536","ref":"dcikatic/SOL-536","sha":"766f7ecc4c98834218cf0ea05768769d5b3c4f31","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":"2015-05-29T13:46:58Z","pushed_at":"2015-05-29T14:46:10Z","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":1965857,"stargazers_count":1950,"watchers_count":1950,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1118,"mirror_url":null,"open_issues_count":203,"forks":1118,"open_issues":203,"watchers":1950,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"0d975674c29694566fa17d093776df56f51b25ca","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":"2015-05-29T13:46:58Z","pushed_at":"2015-05-29T14:46:10Z","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":1965857,"stargazers_count":1950,"watchers_count":1950,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1118,"mirror_url":null,"open_issues_count":203,"forks":1118,"open_issues":203,"watchers":1950,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/8229"},"html":{"href":"https://github.com/edx/edx-platform/pull/8229"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/8229"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/8229/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/8229/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/8229/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/766f7ecc4c98834218cf0ea05768769d5b3c4f31"}}}}