{"action":"created","issue":{"url":"https://api.github.com/repos/edx/edx-analytics-dashboard/issues/533","repository_url":"https://api.github.com/repos/edx/edx-analytics-dashboard","labels_url":"https://api.github.com/repos/edx/edx-analytics-dashboard/issues/533/labels{/name}","comments_url":"https://api.github.com/repos/edx/edx-analytics-dashboard/issues/533/comments","events_url":"https://api.github.com/repos/edx/edx-analytics-dashboard/issues/533/events","html_url":"https://github.com/edx/edx-analytics-dashboard/pull/533","id":170354085,"number":533,"title":"Adds a \"Download CSV\" button to the Learner List View","user":{"login":"pomegranited","id":7556571,"avatar_url":"https://avatars.githubusercontent.com/u/7556571?v=3","gravatar_id":"","url":"https://api.github.com/users/pomegranited","html_url":"https://github.com/pomegranited","followers_url":"https://api.github.com/users/pomegranited/followers","following_url":"https://api.github.com/users/pomegranited/following{/other_user}","gists_url":"https://api.github.com/users/pomegranited/gists{/gist_id}","starred_url":"https://api.github.com/users/pomegranited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pomegranited/subscriptions","organizations_url":"https://api.github.com/users/pomegranited/orgs","repos_url":"https://api.github.com/users/pomegranited/repos","events_url":"https://api.github.com/users/pomegranited/events{/privacy}","received_events_url":"https://api.github.com/users/pomegranited/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/edx/edx-analytics-dashboard/labels/blocked%20by%20other%20work","name":"blocked by other work","color":"009800"},{"url":"https://api.github.com/repos/edx/edx-analytics-dashboard/labels/open-source-contribution","name":"open-source-contribution","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2016-08-10T07:55:09Z","updated_at":"2016-09-07T13:38:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx/edx-analytics-dashboard/pulls/533","html_url":"https://github.com/edx/edx-analytics-dashboard/pull/533","diff_url":"https://github.com/edx/edx-analytics-dashboard/pull/533.diff","patch_url":"https://github.com/edx/edx-analytics-dashboard/pull/533.patch"},"body":"Adds a button to the Course Learners page, which allows the selected learners list to be downloaded in CSV format.\r\n\r\nThis report is proxied as a plain text response from the Learner Analytics Data API.\r\n\r\nThis feature is disabled by default, and can be enabled using the `enable_learner_download` waffle switch.\r\n\r\n**Discussions**: Architecture discussed extensively with @mulby and the analytics team, and UI changes designed by Alyssa Boehm.\r\n\r\n**Dependencies**: [edx-analytics-data-api #128](https://github.com/edx/edx-analytics-data-api/pull/128)\r\n\r\n**Screenshots**:\r\n\r\nWith no search filters:\r\n\r\n![screen shot 2016-08-10 at 5 13 12 pm](https://cloud.githubusercontent.com/assets/7556571/17545776/cc822a2c-5f1d-11e6-9e40-8d82675e5c7a.png)\r\n\r\nWith search filters:\r\n![screen shot 2016-08-10 at 5 14 15 pm](https://cloud.githubusercontent.com/assets/7556571/17545797/f1ad83a0-5f1d-11e6-8bff-fac0bc3e8657.png)\r\n\r\nResponsive positioning on small screen:\r\n![screen shot 2016-08-10 at 5 15 47 pm](https://cloud.githubusercontent.com/assets/7556571/17545831/1e1dcaa8-5f1e-11e6-9813-5b37c7d1cc75.png)\r\n\r\n**Partner information**: 3rd party-hosted open edX instance\r\n\r\n**Testing instructions**:\r\n\r\n1. See testing setup instructions on [edx-analytics-data-api #128](https://github.com/edx/edx-analytics-data-api/pull/128).\r\n1. Run the LMS, Analytics elasticsearch service, and analytics_data_api.  Ensure that you can see your course in the Analytics API http://localhost:8100/docs/#!/api/Learner_List.\r\n1. Update `/edx/etc/insights.xml` to store your Analytics API client token, and your desired CSV field list, e.g.,\r\n\r\n    ```\r\nDATA_API_AUTH_TOKEN: your-api-token\r\n````\r\n1. Enable the Learner view in Insights:\r\n\r\n    ```\r\nsudo su insights\r\n./manage.py waffle_flag display_learner_analytics --staff --create\r\n./manage.py waffle_switch enable_course_api on --create\r\n```\r\n1. Launch Insights, visit the Learners page, and ensure that there is no `Download CSV` button like the one in the above screenshots.\r\n1. Enable this feature switch:\r\n\r\n    ```\r\n./manage.py waffle_switch enable_learner_download on --create \r\n```\r\n1. Relaunch Insights and visit the Learners page to see the new `Download CSV` button.  Click on it to download the CSV file, which should contain all the fields in the learner API call, in alphabetical order.\r\n1. Update `/edx/etc/insights.xml` to update the CSV field list, e.g.,\r\n\r\n    ```\r\nLEARNER_API_LIST_DOWNLOAD_FIELDS: username,name,email,cohort,enrollment_date,last_updated\r\n```\r\n1. Relaunch Insights, and download the CSV report again.  It should contain only the fields specified in your `settings.LEARNER_API_LIST_DOWNLOAD_FIELDS`, in that order.\r\n1. Load the CSV report URL in an incognito browser, and ensure that you see a Permission Denied error.\r\n\r\n**Reviewers**\r\n- [x] @bradenmacdonald \r\n- [x] @dsjen \r\n- [ ] @thallada \r\n- [x] Accessibility - @clrux\r\n\r\n**Pre-Merge Checklist**\r\n\r\n- [x] Rebase with current master\r\n- [x] Squash into single commit\r\n- [ ] Ensure tests pass\r\n- [ ] Merge\r\n"},"comment":{"url":"https://api.github.com/repos/edx/edx-analytics-dashboard/issues/comments/245282949","html_url":"https://github.com/edx/edx-analytics-dashboard/pull/533#issuecomment-245282949","issue_url":"https://api.github.com/repos/edx/edx-analytics-dashboard/issues/533","id":245282949,"user":{"login":"pomegranited","id":7556571,"avatar_url":"https://avatars.githubusercontent.com/u/7556571?v=3","gravatar_id":"","url":"https://api.github.com/users/pomegranited","html_url":"https://github.com/pomegranited","followers_url":"https://api.github.com/users/pomegranited/followers","following_url":"https://api.github.com/users/pomegranited/following{/other_user}","gists_url":"https://api.github.com/users/pomegranited/gists{/gist_id}","starred_url":"https://api.github.com/users/pomegranited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pomegranited/subscriptions","organizations_url":"https://api.github.com/users/pomegranited/orgs","repos_url":"https://api.github.com/users/pomegranited/repos","events_url":"https://api.github.com/users/pomegranited/events{/privacy}","received_events_url":"https://api.github.com/users/pomegranited/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T13:38:34Z","updated_at":"2016-09-07T13:38:34Z","body":"I've addressed @clrux's comments, and fixed the affected tests.\r\n\r\nSquashed 3f86edd..3144150 into 3914876.\r\n\r\n@thallada and @dsjen was there anything else you need me to fix before this can be merged?"}}
{"actor":{"display_login":"pomegranited"}}