{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/31412867","id":31412867,"diff_hunk":"@@ -329,8 +329,14 @@ <h2 class=\"navbar\">[ <a href=\"#\" onclick=\"goto('Grades');\" class=\"${modeflag.get\n     </div>\n     % endif\n \n-    <input type=\"submit\" name=\"action\" value=\"List enrolled students\" class=\"${'is-disabled' if disable_buttons else ''}\" aria-disabled=\"${'true' if disable_buttons else 'false'}\">\n-    <input type=\"submit\" name=\"action\" value=\"List students who may enroll but may not have yet signed up\" class=\"${'is-disabled' if disable_buttons else ''}\" aria-disabled=\"${'true' if disable_buttons else 'false'}\" >\n+    <p>\n+      <input type=\"submit\" name=\"action\" value=\"List enrolled students\" class=\"${'is-disabled' if disable_buttons else ''}\" aria-disabled=\"${'true' if disable_buttons else 'false'}\">","path":"lms/templates/courseware/legacy_instructor_dashboard.html","position":null,"original_position":7,"commit_id":"71d25743ab3343c7b0ad64d17215e43d4f182eab","original_commit_id":"397d35ce8101484547b6281c0d45f32b60fd0bd8","user":{"login":"itsjeyd","id":961441,"avatar_url":"https://avatars.githubusercontent.com/u/961441?v=3","gravatar_id":"","url":"https://api.github.com/users/itsjeyd","html_url":"https://github.com/itsjeyd","followers_url":"https://api.github.com/users/itsjeyd/followers","following_url":"https://api.github.com/users/itsjeyd/following{/other_user}","gists_url":"https://api.github.com/users/itsjeyd/gists{/gist_id}","starred_url":"https://api.github.com/users/itsjeyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsjeyd/subscriptions","organizations_url":"https://api.github.com/users/itsjeyd/orgs","repos_url":"https://api.github.com/users/itsjeyd/repos","events_url":"https://api.github.com/users/itsjeyd/events{/privacy}","received_events_url":"https://api.github.com/users/itsjeyd/received_events","type":"User","site_admin":false},"body":"Addressed in 71d2574.\r\n\r\nScreenshot:\r\n\r\n![legacy-dashboard-button-removed](https://cloud.githubusercontent.com/assets/961441/7910522/ce4e18b8-0855-11e5-847b-dc6e8af2f4be.png)\r\n","created_at":"2015-06-01T10:00:51Z","updated_at":"2015-06-01T10:00:51Z","html_url":"https://github.com/edx/edx-platform/pull/8167#discussion_r31412867","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/8167","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/31412867"},"html":{"href":"https://github.com/edx/edx-platform/pull/8167#discussion_r31412867"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/8167"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/8167","id":36035344,"html_url":"https://github.com/edx/edx-platform/pull/8167","diff_url":"https://github.com/edx/edx-platform/pull/8167.diff","patch_url":"https://github.com/edx/edx-platform/pull/8167.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/8167","number":8167,"state":"open","locked":false,"title":"Instructor Dashboard: Add functionality for obtaining list of students who may enroll in a course but haven't signed up yet","user":{"login":"itsjeyd","id":961441,"avatar_url":"https://avatars.githubusercontent.com/u/961441?v=3","gravatar_id":"","url":"https://api.github.com/users/itsjeyd","html_url":"https://github.com/itsjeyd","followers_url":"https://api.github.com/users/itsjeyd/followers","following_url":"https://api.github.com/users/itsjeyd/following{/other_user}","gists_url":"https://api.github.com/users/itsjeyd/gists{/gist_id}","starred_url":"https://api.github.com/users/itsjeyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsjeyd/subscriptions","organizations_url":"https://api.github.com/users/itsjeyd/orgs","repos_url":"https://api.github.com/users/itsjeyd/repos","events_url":"https://api.github.com/users/itsjeyd/events{/privacy}","received_events_url":"https://api.github.com/users/itsjeyd/received_events","type":"User","site_admin":false},"body":"## Background\r\n\r\nThis PR addresses JIRA ticket [TNL-1652](https://openedx.atlassian.net/browse/TNL-1652), which is based on the following feature proposal: [OSPR-171](https://openedx.atlassian.net/browse/OSPR-171)\r\n\r\nIt moves functionality for obtaining a list of students who may enroll in a given course but have not signed up yet from the legacy dashboard to the Instructor Dashboard.\r\n\r\nThe functionality that this PR adds to the Instructor Dashboard differs from the functionality that used to be available on the legacy dashboard in two ways:\r\n\r\n1.  Instead of displaying a list of students who may enroll in a course on the dashboard, results are made available for download in the form of a CSV file.\r\n2.  Existing enrollments are taken into account when computing the list of students who may enroll in a course. This means that students who are allowed to enroll in the course **and** have already done so will not be added to the resulting CSV file.\r\n\r\n## Affected components\r\n\r\nThis PR affects the LMS. In particular, it introduces changes to the legacy dashboard and the new instructor dashboard (as explained above).\r\n\r\n## Affected users\r\n\r\nThe changes introduced in this PR only affect users with staff privileges; they do not affect all edX students.\r\n\r\n## Instructions for manual testing\r\n\r\n1.  On Devstack, start a Django shell via\r\n\r\n        ./manage.py lms shell --settings=devstack\r\n\r\n    and add test data by executing the following code:\r\n\r\n        from student.models import CourseEnrollmentAllowed\r\n        course_id = \"edX/DemoX/Demo_Course\"\r\n        for n in range(3):\r\n            CourseEnrollmentAllowed.objects.create(email=\"student{}@example.com\".format(n), course_id=course_id)\r\n\r\n        CourseEnrollmentAllowed.objects.create(email=\"staff@example.com\", course_id=course_id)\r\n\r\n2.  Run the LMS and sign in as `staff@example.com`.\r\n\r\n3.  Navigate to <http://localhost:8000/courses/edX/DemoX/Demo_Course/instructor> and click on the \"Data Download\" tab.\r\n\r\n4.  Click \"Download info about students who may enroll as a CSV\" to generate a CSV file with the same data (will be added to the list of files available for download when it's ready).\r\n\r\n5.  Check the contents of the CSV file (as `vagrant` user) via:\r\n\r\n        cd /tmp/edx-s3/grades/edX%2FDemoX%2FDemo_Course/\r\n        cat edX_DemoX_Demo_Course_may_enroll_info_YYYY-MM-DD-HHMM.csv\r\n\r\nObserve that the results do not include students who are already enrolled in the Demo Course (in this case: `staff@example.com`).\r\n\r\n## Screenshots\r\n\r\n### Legacy dashboard\r\n\r\nLegacy dashboard displaying instructions on where to find deprecated functionality:\r\n\r\n![legacy-dashboard-message](https://cloud.githubusercontent.com/assets/961441/7771810/604e294c-009a-11e5-9d6b-c7903779b31f.png)\r\n\r\n### Instructor dashboard\r\n\r\nNew controls for downloading list of students who may enroll:\r\n\r\n![data-download-reports-highlighted](https://cloud.githubusercontent.com/assets/961441/7771828/72a64e58-009a-11e5-8d75-534a03444019.png)\r\n\r\nCSV generation in progress:\r\n\r\n![data-download-reports-in-progress-highlighted](https://cloud.githubusercontent.com/assets/961441/7771844/8309b65e-009a-11e5-8b12-5ac747e7ae65.png)\r\n\r\nResults have become available:\r\n\r\n![data-download-reports-with-results-highlighted](https://cloud.githubusercontent.com/assets/961441/7771855/8f11160e-009a-11e5-9e40-6bba36bfe10d.png)\r\n\r\n## Licensing\r\n\r\nThis PR is covered by the OpenCraft contributor agreement (@antoviaque).\r\n\r\n---\r\n\r\nPlease review this PR. I'll be happy to incorporate any suggestions for improvements. Thanks!\r\n","created_at":"2015-05-22T14:22:02Z","updated_at":"2015-06-01T10:00:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16c79a8e674976693f0e32b8a7d3008ef8781f8a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/8167/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/8167/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/8167/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/71d25743ab3343c7b0ad64d17215e43d4f182eab","head":{"label":"itsjeyd:tim/TNL-1652","ref":"tim/TNL-1652","sha":"71d25743ab3343c7b0ad64d17215e43d4f182eab","user":{"login":"itsjeyd","id":961441,"avatar_url":"https://avatars.githubusercontent.com/u/961441?v=3","gravatar_id":"","url":"https://api.github.com/users/itsjeyd","html_url":"https://github.com/itsjeyd","followers_url":"https://api.github.com/users/itsjeyd/followers","following_url":"https://api.github.com/users/itsjeyd/following{/other_user}","gists_url":"https://api.github.com/users/itsjeyd/gists{/gist_id}","starred_url":"https://api.github.com/users/itsjeyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsjeyd/subscriptions","organizations_url":"https://api.github.com/users/itsjeyd/orgs","repos_url":"https://api.github.com/users/itsjeyd/repos","events_url":"https://api.github.com/users/itsjeyd/events{/privacy}","received_events_url":"https://api.github.com/users/itsjeyd/received_events","type":"User","site_admin":false},"repo":{"id":35811195,"name":"edx-platform","full_name":"itsjeyd/edx-platform","owner":{"login":"itsjeyd","id":961441,"avatar_url":"https://avatars.githubusercontent.com/u/961441?v=3","gravatar_id":"","url":"https://api.github.com/users/itsjeyd","html_url":"https://github.com/itsjeyd","followers_url":"https://api.github.com/users/itsjeyd/followers","following_url":"https://api.github.com/users/itsjeyd/following{/other_user}","gists_url":"https://api.github.com/users/itsjeyd/gists{/gist_id}","starred_url":"https://api.github.com/users/itsjeyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsjeyd/subscriptions","organizations_url":"https://api.github.com/users/itsjeyd/orgs","repos_url":"https://api.github.com/users/itsjeyd/repos","events_url":"https://api.github.com/users/itsjeyd/events{/privacy}","received_events_url":"https://api.github.com/users/itsjeyd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/itsjeyd/edx-platform","description":"Open edX, the edX platform that powers http://edx.org","fork":true,"url":"https://api.github.com/repos/itsjeyd/edx-platform","forks_url":"https://api.github.com/repos/itsjeyd/edx-platform/forks","keys_url":"https://api.github.com/repos/itsjeyd/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itsjeyd/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itsjeyd/edx-platform/teams","hooks_url":"https://api.github.com/repos/itsjeyd/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/itsjeyd/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/itsjeyd/edx-platform/events","assignees_url":"https://api.github.com/repos/itsjeyd/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/itsjeyd/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/itsjeyd/edx-platform/tags","blobs_url":"https://api.github.com/repos/itsjeyd/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itsjeyd/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itsjeyd/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/itsjeyd/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itsjeyd/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/itsjeyd/edx-platform/languages","stargazers_url":"https://api.github.com/repos/itsjeyd/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/itsjeyd/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/itsjeyd/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/itsjeyd/edx-platform/subscription","commits_url":"https://api.github.com/repos/itsjeyd/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/itsjeyd/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/itsjeyd/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/itsjeyd/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/itsjeyd/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/itsjeyd/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itsjeyd/edx-platform/merges","archive_url":"https://api.github.com/repos/itsjeyd/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itsjeyd/edx-platform/downloads","issues_url":"https://api.github.com/repos/itsjeyd/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/itsjeyd/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/itsjeyd/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/itsjeyd/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itsjeyd/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/itsjeyd/edx-platform/releases{/id}","created_at":"2015-05-18T10:18:54Z","updated_at":"2015-05-18T10:19:23Z","pushed_at":"2015-06-01T09:58:27Z","git_url":"git://github.com/itsjeyd/edx-platform.git","ssh_url":"git@github.com:itsjeyd/edx-platform.git","clone_url":"https://github.com/itsjeyd/edx-platform.git","svn_url":"https://github.com/itsjeyd/edx-platform","homepage":"http://openedx.org/","size":476659,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"b0b6967a43164b4c21c5e6df4b9dba4e9ecf1b5b","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-31T01:48:02Z","pushed_at":"2015-06-01T09:59:29Z","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":1964031,"stargazers_count":1951,"watchers_count":1951,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1121,"mirror_url":null,"open_issues_count":201,"forks":1121,"open_issues":201,"watchers":1951,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/8167"},"html":{"href":"https://github.com/edx/edx-platform/pull/8167"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/8167"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/8167/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/8167/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/8167/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/71d25743ab3343c7b0ad64d17215e43d4f182eab"}}}}