{"action":"created","comment":{"url":"https://api.github.com/repos/mitocw/edx-platform/pulls/comments/42506650","id":42506650,"diff_hunk":"@@ -338,6 +339,31 @@ def get_ccx_for_coach(course, coach):\n     return None\n \n \n+def get_date(ccx, node, date_type=None, parent_node=None):\n+    \"\"\"\n+    This returns override or master date for section, subsection or a unit.\n+\n+    :param ccx: ccx instance\n+    :param node: chapter, subsection or unit\n+    :param date_type: start or due\n+    :param parent_node: parent of node\n+    :return: start or due date\n+    \"\"\"\n+    date = get_override_for_ccx(ccx, node, date_type, None)\n+    master_date = node.start if date_type == \"start\" else node.due\n+    if date:\n+        # Setting override date [start or due]\n+        date = str(date)[:-9]\n+    elif not parent_node and master_date:\n+        # Get date from master course\n+        date = str(master_date)[:-9]\n+    elif parent_node:","path":"lms/djangoapps/ccx/views.py","position":30,"original_position":30,"commit_id":"53a7269d9834b4f1422c38f666f88fa3b350cb00","original_commit_id":"53a7269d9834b4f1422c38f666f88fa3b350cb00","user":{"login":"giocalitri","id":1005204,"avatar_url":"https://avatars.githubusercontent.com/u/1005204?v=3","gravatar_id":"","url":"https://api.github.com/users/giocalitri","html_url":"https://github.com/giocalitri","followers_url":"https://api.github.com/users/giocalitri/followers","following_url":"https://api.github.com/users/giocalitri/following{/other_user}","gists_url":"https://api.github.com/users/giocalitri/gists{/gist_id}","starred_url":"https://api.github.com/users/giocalitri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giocalitri/subscriptions","organizations_url":"https://api.github.com/users/giocalitri/orgs","repos_url":"https://api.github.com/users/giocalitri/repos","events_url":"https://api.github.com/users/giocalitri/events{/privacy}","received_events_url":"https://api.github.com/users/giocalitri/received_events","type":"User","site_admin":false},"body":"same for the `None`","created_at":"2015-10-20T14:58:34Z","updated_at":"2015-10-20T14:58:34Z","html_url":"https://github.com/mitocw/edx-platform/pull/99#discussion_r42506650","pull_request_url":"https://api.github.com/repos/mitocw/edx-platform/pulls/99","_links":{"self":{"href":"https://api.github.com/repos/mitocw/edx-platform/pulls/comments/42506650"},"html":{"href":"https://github.com/mitocw/edx-platform/pull/99#discussion_r42506650"},"pull_request":{"href":"https://api.github.com/repos/mitocw/edx-platform/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/mitocw/edx-platform/pulls/99","id":47121453,"html_url":"https://github.com/mitocw/edx-platform/pull/99","diff_url":"https://github.com/mitocw/edx-platform/pull/99.diff","patch_url":"https://github.com/mitocw/edx-platform/pull/99.patch","issue_url":"https://api.github.com/repos/mitocw/edx-platform/issues/99","number":99,"state":"open","locked":false,"title":"Made dates configuration for CCX schedule same as in studio (Course)","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},"body":"Hi\r\n In this PR I am done with\r\n\r\n#### Fixed UI style\r\n- Fixed UI style according to http://ux.edx.org/elements/forms/\r\n\r\n#### SCHEDULE A UNIT\r\n- If coach has not override dates then i am using start and due date of master course if they exist.\r\n- Showing disabled start and due date if user has not selected chapter from dropdown.\r\n- Showing only start date fields enable for a chapter.\r\n- Showing start and due date fields enable for a sub section.\r\n- Showing disabled start and due date fields for a unit.\r\n\r\n#### Schedule Tree\r\n- Coach can change start date of a **chapter**.\r\n- A **chapter** do not have due date node on schedule tree. There is **N/A** in due date node.\r\n- Coach can change both start and due date of subsection. Afterword all units of that subsection will be update.\r\n- **Unit** inherits start and due dates of its subsection.\r\n- Showing **unscheduled** on **units** that don't have dates.\r\n\r\n@pdpinch @giocalitri @pwilkins \r\nIssue #85\r\nIssue https://github.com/mitocw/edx-platform/issues/86\r\nIssue https://github.com/mitocw/edx-platform/issues/80\r\nIssue https://github.com/mitocw/edx-platform/issues/51\r\nIssue https://github.com/mitocw/edx-platform/issues/100\r\n\r\n![screen shot 2015-10-08 at 12 37 37 pm](https://cloud.githubusercontent.com/assets/10431250/10360643/91c94c98-6dbb-11e5-8b5d-d6dfe7de428b.png)\r\n![screen shot 2015-10-08 at 12 37 43 pm](https://cloud.githubusercontent.com/assets/10431250/10360645/91cbf146-6dbb-11e5-8de6-5d06e4fb2aac.png)\r\n![screen shot 2015-10-08 at 12 37 54 pm](https://cloud.githubusercontent.com/assets/10431250/10360646/91cc8782-6dbb-11e5-93d3-92073bddaefe.png)\r\n![screen shot 2015-10-08 at 12 38 02 pm](https://cloud.githubusercontent.com/assets/10431250/10360644/91cbfae2-6dbb-11e5-9efa-5887690066c0.png)\r\n![screen shot 2015-10-08 at 12 38 11 pm](https://cloud.githubusercontent.com/assets/10431250/10360647/91fe1c52-6dbb-11e5-9858-7533e62f606d.png)\r\n![screen shot 2015-10-08 at 12 38 25 pm](https://cloud.githubusercontent.com/assets/10431250/10360648/920333e0-6dbb-11e5-9aba-eae2452e37f3.png)\r\n![screen shot 2015-10-08 at 3 14 49 pm](https://cloud.githubusercontent.com/assets/10431250/10363725/93b001d2-6dcf-11e5-8701-7a1cbf9e062c.png)\r\n","created_at":"2015-10-08T07:53:51Z","updated_at":"2015-10-20T14:58:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ab0e4c82c44a4dadd88038d1189d3bce099b28c","assignee":{"login":"giocalitri","id":1005204,"avatar_url":"https://avatars.githubusercontent.com/u/1005204?v=3","gravatar_id":"","url":"https://api.github.com/users/giocalitri","html_url":"https://github.com/giocalitri","followers_url":"https://api.github.com/users/giocalitri/followers","following_url":"https://api.github.com/users/giocalitri/following{/other_user}","gists_url":"https://api.github.com/users/giocalitri/gists{/gist_id}","starred_url":"https://api.github.com/users/giocalitri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giocalitri/subscriptions","organizations_url":"https://api.github.com/users/giocalitri/orgs","repos_url":"https://api.github.com/users/giocalitri/repos","events_url":"https://api.github.com/users/giocalitri/events{/privacy}","received_events_url":"https://api.github.com/users/giocalitri/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mitocw/edx-platform/pulls/99/commits","review_comments_url":"https://api.github.com/repos/mitocw/edx-platform/pulls/99/comments","review_comment_url":"https://api.github.com/repos/mitocw/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mitocw/edx-platform/issues/99/comments","statuses_url":"https://api.github.com/repos/mitocw/edx-platform/statuses/53a7269d9834b4f1422c38f666f88fa3b350cb00","head":{"label":"mitocw:enhancement/aq/disbale_due_dates_section_unit","ref":"enhancement/aq/disbale_due_dates_section_unit","sha":"53a7269d9834b4f1422c38f666f88fa3b350cb00","user":{"login":"mitocw","id":3009146,"avatar_url":"https://avatars.githubusercontent.com/u/3009146?v=3","gravatar_id":"","url":"https://api.github.com/users/mitocw","html_url":"https://github.com/mitocw","followers_url":"https://api.github.com/users/mitocw/followers","following_url":"https://api.github.com/users/mitocw/following{/other_user}","gists_url":"https://api.github.com/users/mitocw/gists{/gist_id}","starred_url":"https://api.github.com/users/mitocw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitocw/subscriptions","organizations_url":"https://api.github.com/users/mitocw/orgs","repos_url":"https://api.github.com/users/mitocw/repos","events_url":"https://api.github.com/users/mitocw/events{/privacy}","received_events_url":"https://api.github.com/users/mitocw/received_events","type":"Organization","site_admin":false},"repo":{"id":17842334,"name":"edx-platform","full_name":"mitocw/edx-platform","owner":{"login":"mitocw","id":3009146,"avatar_url":"https://avatars.githubusercontent.com/u/3009146?v=3","gravatar_id":"","url":"https://api.github.com/users/mitocw","html_url":"https://github.com/mitocw","followers_url":"https://api.github.com/users/mitocw/followers","following_url":"https://api.github.com/users/mitocw/following{/other_user}","gists_url":"https://api.github.com/users/mitocw/gists{/gist_id}","starred_url":"https://api.github.com/users/mitocw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitocw/subscriptions","organizations_url":"https://api.github.com/users/mitocw/orgs","repos_url":"https://api.github.com/users/mitocw/repos","events_url":"https://api.github.com/users/mitocw/events{/privacy}","received_events_url":"https://api.github.com/users/mitocw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitocw/edx-platform","description":"the edX learning management system (LMS) and course authoring tool, Studio","fork":true,"url":"https://api.github.com/repos/mitocw/edx-platform","forks_url":"https://api.github.com/repos/mitocw/edx-platform/forks","keys_url":"https://api.github.com/repos/mitocw/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitocw/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitocw/edx-platform/teams","hooks_url":"https://api.github.com/repos/mitocw/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/mitocw/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/mitocw/edx-platform/events","assignees_url":"https://api.github.com/repos/mitocw/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/mitocw/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/mitocw/edx-platform/tags","blobs_url":"https://api.github.com/repos/mitocw/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitocw/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitocw/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitocw/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitocw/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/mitocw/edx-platform/languages","stargazers_url":"https://api.github.com/repos/mitocw/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/mitocw/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/mitocw/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/mitocw/edx-platform/subscription","commits_url":"https://api.github.com/repos/mitocw/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitocw/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitocw/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitocw/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitocw/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/mitocw/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitocw/edx-platform/merges","archive_url":"https://api.github.com/repos/mitocw/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitocw/edx-platform/downloads","issues_url":"https://api.github.com/repos/mitocw/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/mitocw/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/mitocw/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/mitocw/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitocw/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/mitocw/edx-platform/releases{/id}","created_at":"2014-03-17T20:32:05Z","updated_at":"2015-10-16T20:03:53Z","pushed_at":"2015-10-20T14:54:25Z","git_url":"git://github.com/mitocw/edx-platform.git","ssh_url":"git@github.com:mitocw/edx-platform.git","clone_url":"https://github.com/mitocw/edx-platform.git","svn_url":"https://github.com/mitocw/edx-platform","homepage":"http://code.edx.org/","size":546138,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":60,"forks":1,"open_issues":60,"watchers":1,"default_branch":"master"}},"base":{"label":"mitocw:master","ref":"master","sha":"69c47e09511c0fda4762dc959a6a3025dc96f272","user":{"login":"mitocw","id":3009146,"avatar_url":"https://avatars.githubusercontent.com/u/3009146?v=3","gravatar_id":"","url":"https://api.github.com/users/mitocw","html_url":"https://github.com/mitocw","followers_url":"https://api.github.com/users/mitocw/followers","following_url":"https://api.github.com/users/mitocw/following{/other_user}","gists_url":"https://api.github.com/users/mitocw/gists{/gist_id}","starred_url":"https://api.github.com/users/mitocw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitocw/subscriptions","organizations_url":"https://api.github.com/users/mitocw/orgs","repos_url":"https://api.github.com/users/mitocw/repos","events_url":"https://api.github.com/users/mitocw/events{/privacy}","received_events_url":"https://api.github.com/users/mitocw/received_events","type":"Organization","site_admin":false},"repo":{"id":17842334,"name":"edx-platform","full_name":"mitocw/edx-platform","owner":{"login":"mitocw","id":3009146,"avatar_url":"https://avatars.githubusercontent.com/u/3009146?v=3","gravatar_id":"","url":"https://api.github.com/users/mitocw","html_url":"https://github.com/mitocw","followers_url":"https://api.github.com/users/mitocw/followers","following_url":"https://api.github.com/users/mitocw/following{/other_user}","gists_url":"https://api.github.com/users/mitocw/gists{/gist_id}","starred_url":"https://api.github.com/users/mitocw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitocw/subscriptions","organizations_url":"https://api.github.com/users/mitocw/orgs","repos_url":"https://api.github.com/users/mitocw/repos","events_url":"https://api.github.com/users/mitocw/events{/privacy}","received_events_url":"https://api.github.com/users/mitocw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitocw/edx-platform","description":"the edX learning management system (LMS) and course authoring tool, Studio","fork":true,"url":"https://api.github.com/repos/mitocw/edx-platform","forks_url":"https://api.github.com/repos/mitocw/edx-platform/forks","keys_url":"https://api.github.com/repos/mitocw/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitocw/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitocw/edx-platform/teams","hooks_url":"https://api.github.com/repos/mitocw/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/mitocw/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/mitocw/edx-platform/events","assignees_url":"https://api.github.com/repos/mitocw/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/mitocw/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/mitocw/edx-platform/tags","blobs_url":"https://api.github.com/repos/mitocw/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitocw/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitocw/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitocw/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitocw/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/mitocw/edx-platform/languages","stargazers_url":"https://api.github.com/repos/mitocw/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/mitocw/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/mitocw/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/mitocw/edx-platform/subscription","commits_url":"https://api.github.com/repos/mitocw/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitocw/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitocw/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitocw/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitocw/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/mitocw/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitocw/edx-platform/merges","archive_url":"https://api.github.com/repos/mitocw/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitocw/edx-platform/downloads","issues_url":"https://api.github.com/repos/mitocw/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/mitocw/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/mitocw/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/mitocw/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitocw/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/mitocw/edx-platform/releases{/id}","created_at":"2014-03-17T20:32:05Z","updated_at":"2015-10-16T20:03:53Z","pushed_at":"2015-10-20T14:54:25Z","git_url":"git://github.com/mitocw/edx-platform.git","ssh_url":"git@github.com:mitocw/edx-platform.git","clone_url":"https://github.com/mitocw/edx-platform.git","svn_url":"https://github.com/mitocw/edx-platform","homepage":"http://code.edx.org/","size":546138,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":60,"forks":1,"open_issues":60,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitocw/edx-platform/pulls/99"},"html":{"href":"https://github.com/mitocw/edx-platform/pull/99"},"issue":{"href":"https://api.github.com/repos/mitocw/edx-platform/issues/99"},"comments":{"href":"https://api.github.com/repos/mitocw/edx-platform/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/mitocw/edx-platform/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/mitocw/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mitocw/edx-platform/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/mitocw/edx-platform/statuses/53a7269d9834b4f1422c38f666f88fa3b350cb00"}}}}