{"action":"created","issue":{"url":"https://api.github.com/repos/mitocw/edx-platform/issues/208","repository_url":"https://api.github.com/repos/mitocw/edx-platform","labels_url":"https://api.github.com/repos/mitocw/edx-platform/issues/208/labels{/name}","comments_url":"https://api.github.com/repos/mitocw/edx-platform/issues/208/comments","events_url":"https://api.github.com/repos/mitocw/edx-platform/issues/208/events","html_url":"https://github.com/mitocw/edx-platform/pull/208","id":135698520,"number":208,"title":"Adds staff and instructor users of the master course to CCX","user":{"login":"amir-qayyum-khan","id":10431250,"avatar_url":"https://avatars.githubusercontent.com/u/10431250?v=3","gravatar_id":"","url":"https://api.github.com/users/amir-qayyum-khan","html_url":"https://github.com/amir-qayyum-khan","followers_url":"https://api.github.com/users/amir-qayyum-khan/followers","following_url":"https://api.github.com/users/amir-qayyum-khan/following{/other_user}","gists_url":"https://api.github.com/users/amir-qayyum-khan/gists{/gist_id}","starred_url":"https://api.github.com/users/amir-qayyum-khan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amir-qayyum-khan/subscriptions","organizations_url":"https://api.github.com/users/amir-qayyum-khan/orgs","repos_url":"https://api.github.com/users/amir-qayyum-khan/repos","events_url":"https://api.github.com/users/amir-qayyum-khan/events{/privacy}","received_events_url":"https://api.github.com/users/amir-qayyum-khan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitocw/edx-platform/labels/CCX","name":"CCX","color":"fad8c7"},{"url":"https://api.github.com/repos/mitocw/edx-platform/labels/in%20progress","name":"in progress","color":"ededed"},{"url":"https://api.github.com/repos/mitocw/edx-platform/labels/Waiting%20on%20Author","name":"Waiting on Author","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"amir-qayyum-khan","id":10431250,"avatar_url":"https://avatars.githubusercontent.com/u/10431250?v=3","gravatar_id":"","url":"https://api.github.com/users/amir-qayyum-khan","html_url":"https://github.com/amir-qayyum-khan","followers_url":"https://api.github.com/users/amir-qayyum-khan/followers","following_url":"https://api.github.com/users/amir-qayyum-khan/following{/other_user}","gists_url":"https://api.github.com/users/amir-qayyum-khan/gists{/gist_id}","starred_url":"https://api.github.com/users/amir-qayyum-khan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amir-qayyum-khan/subscriptions","organizations_url":"https://api.github.com/users/amir-qayyum-khan/orgs","repos_url":"https://api.github.com/users/amir-qayyum-khan/repos","events_url":"https://api.github.com/users/amir-qayyum-khan/events{/privacy}","received_events_url":"https://api.github.com/users/amir-qayyum-khan/received_events","type":"User","site_admin":false},"milestone":null,"comments":25,"created_at":"2016-02-23T10:33:07Z","updated_at":"2016-03-07T16:15:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mitocw/edx-platform/pulls/208","html_url":"https://github.com/mitocw/edx-platform/pull/208","diff_url":"https://github.com/mitocw/edx-platform/pull/208.diff","patch_url":"https://github.com/mitocw/edx-platform/pull/208.patch"},"body":"### Background\r\nfixes https://github.com/mitocw/edx-platform/issues/126, fixes https://github.com/mitocw/edx-platform/issues/155, fixes https://github.com/mitocw/edx-platform/issues/115 and fixes https://github.com/mitocw/edx-platform/issues/205\r\n\r\nThis is an updated version of https://github.com/edx/edx-platform/pull/10877 which had to be reverted. \r\n\r\n### What is done in this PR\r\n**Studio Updates:** \r\n- Remove ccx from staff dashboard inside studio. Because  a master course can have unlimited ccx, staff's dashboard can be populated with a huge list of ccx along with master course \r\n\r\n**LMS Updates:** \r\n- This is for course staff to see what ccx coaches are doing with course.\r\n- Now when a coach creates a new ccx, I am assigning staff role on this ccx course to all staff of master course.\r\n- Added instructors of master course as instructor(s) in ccx.\r\n- Also adds the master course staff users to new CCX created via the CCX REST APIs\r\n- **Note:** This code will add/enrol staff and instructors in ccx and now max student limit for ccx depends on number of staff and admins. \r\n- Fixed view as student issue on ccx, now staff can view as student and see how ccx  view will appear to student\r\n- Fixed display name on ccx coach dashboard. Previously it was show display name of master course on coach dashboard.\r\n\r\n##### To run migration manually on devstack\r\n- ``python manage.py lms migrate ccx 0003 --settings=devstack``\r\n##### To reverse migration manually on devstack\r\n- ``python manage.py lms migrate ccx 0002 --settings=devstack``\r\n\r\n\r\n@pdpinch @giocalitri \r\n\r\n- Staff on Master course\r\n![screen shot 2015-11-30 at 5 12 54 pm](https://cloud.githubusercontent.com/assets/10431250/11471231/ba5e9cc8-9785-11e5-95c5-0cdcea97f780.png)\r\n\r\n- Staff on CCX\r\n![screen shot 2015-11-30 at 5 13 04 pm](https://cloud.githubusercontent.com/assets/10431250/11471234/c2d0a9dc-9785-11e5-865f-a1b7d79a34db.png)\r\n\r\n- Admin/instructors on master course\r\n![screen shot 2015-12-10 at 5 10 18 pm](https://cloud.githubusercontent.com/assets/10431250/11715098/08685ed0-9f61-11e5-8b79-87defb82c2c9.png)\r\n\r\n- Admin/instructors on ccx\r\n![screen shot 2015-12-10 at 5 10 22 pm](https://cloud.githubusercontent.com/assets/10431250/11715099/11ada5ae-9f61-11e5-92c3-d0316f1b6190.png)\r\n\r\n#### Fixed view as student\r\n\r\n![screen shot 2015-12-17 at 7 21 37 pm 2](https://cloud.githubusercontent.com/assets/10431250/11871777/8eb3d64e-a4f3-11e5-9b32-d0df4a0dd0a6.png)\r\n![screen shot 2015-12-17 at 7 21 53 pm 2](https://cloud.githubusercontent.com/assets/10431250/11871778/8eb92040-a4f3-11e5-9bb7-49c691d4bb24.png)\r\n![screen shot 2015-12-17 at 7 22 05 pm 2](https://cloud.githubusercontent.com/assets/10431250/11871779/8ebdc94c-a4f3-11e5-9e7d-0ee44b1652c3.png)\r\n\r\n#### Fixed display name of ccx on coach dashboard.\r\n![screen shot 2015-12-18 at 3 29 34 pm](https://cloud.githubusercontent.com/assets/10431250/11894922/3f39bfa8-a59c-11e5-82e9-0dabd349e963.png)\r\n![screen shot 2015-12-18 at 3 29 44 pm](https://cloud.githubusercontent.com/assets/10431250/11894921/3f3880de-a59c-11e5-9d38-da5de6837b8a.png)\r\n![screen shot 2015-12-18 at 3 29 55 pm](https://cloud.githubusercontent.com/assets/10431250/11894923/3f411bf4-a59c-11e5-80bb-b79b5073c936.png)\r\n"},"comment":{"url":"https://api.github.com/repos/mitocw/edx-platform/issues/comments/193322682","html_url":"https://github.com/mitocw/edx-platform/pull/208#issuecomment-193322682","issue_url":"https://api.github.com/repos/mitocw/edx-platform/issues/208","id":193322682,"user":{"login":"pdpinch","id":430126,"avatar_url":"https://avatars.githubusercontent.com/u/430126?v=3","gravatar_id":"","url":"https://api.github.com/users/pdpinch","html_url":"https://github.com/pdpinch","followers_url":"https://api.github.com/users/pdpinch/followers","following_url":"https://api.github.com/users/pdpinch/following{/other_user}","gists_url":"https://api.github.com/users/pdpinch/gists{/gist_id}","starred_url":"https://api.github.com/users/pdpinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdpinch/subscriptions","organizations_url":"https://api.github.com/users/pdpinch/orgs","repos_url":"https://api.github.com/users/pdpinch/repos","events_url":"https://api.github.com/users/pdpinch/events{/privacy}","received_events_url":"https://api.github.com/users/pdpinch/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T16:15:41Z","updated_at":"2016-03-07T16:15:41Z","body":"Ok, looking at the coverage, it looks like we don't have any tests for the changes to the studio dashboard (https://github.com/mitocw/edx-platform/pull/208/files#diff-968532c6bba75e1f61d1e1ddb51d7842). That should be pretty easy to add?\r\n\r\nI forget what it means when there's no coverage in a test file (https://github.com/mitocw/edx-platform/pull/208/files#diff-456698559da70c26842813fa3a28c955R649). Does that mean that the line is never executed? It looks like we aren't testing instructors in addition to staff. Do we have instructors in our test cases? "}}