{"action":"created","issue":{"url":"https://api.github.com/repos/edx/edx-platform/issues/11529","repository_url":"https://api.github.com/repos/edx/edx-platform","labels_url":"https://api.github.com/repos/edx/edx-platform/issues/11529/labels{/name}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/11529/comments","events_url":"https://api.github.com/repos/edx/edx-platform/issues/11529/events","html_url":"https://github.com/edx/edx-platform/pull/11529","id":133240928,"number":11529,"title":"Excluded admins, staff and coach of master course from max enrollment","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/edx/edx-platform/labels/needs%20triage","name":"needs triage","color":"e11d21"},{"url":"https://api.github.com/repos/edx/edx-platform/labels/open-source-contribution","name":"open-source-contribution","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-12T13:23:42Z","updated_at":"2016-02-12T13:24:06Z","closed_at":"2016-02-12T13:24:06Z","pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/11529","html_url":"https://github.com/edx/edx-platform/pull/11529","diff_url":"https://github.com/edx/edx-platform/pull/11529.diff","patch_url":"https://github.com/edx/edx-platform/pull/11529.patch"},"body":"### Background\r\nThis PR resolves https://github.com/mitocw/edx-platform/issues/159\r\n\r\n\r\n### What is done in this PR\r\n**Studio Updates:** None\r\n**LMS Updates:** \r\n-  Excluded staff, admins and coach from the count if enrollments to check if course is full or not https://github.com/edx/edx-platform/blob/a164e2fa0a51b8f48709aa3e44c33f5cdf1b5422/common/djangoapps/student/models.py#L834-L842 .\r\n\r\n##### Pending issue\r\n- When we enrol staff and admins on ccx in ccx creation process then there is now issue in max number of possible enrollment. limit will be same be cause they are excluded.\r\n- But once limit if filled with actual students the no further admin can be enrolled because if the check\r\nhttps://github.com/edx/edx-platform/blob/master/lms/djangoapps/ccx/utils.py#L189\r\nAs you can see here we are not by passing staff and admins (**Issue**)\r\n\r\n@pdpinch @giocalitri \r\n\r\n![screen shot 2016-02-12 at 6 14 37 pm](https://cloud.githubusercontent.com/assets/10431250/13008002/aa014f5a-d1b5-11e5-8833-9d288366e3a9.png)\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/edx/edx-platform/issues/comments/183326578","html_url":"https://github.com/edx/edx-platform/pull/11529#issuecomment-183326578","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/11529","id":183326578,"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},"created_at":"2016-02-12T13:24:06Z","updated_at":"2016-02-12T13:24:06Z","body":"created by mistake "}}