edx/edx-platform — pull request #6110 by wedaly (2014-12-02 14:04:02+00:00)
Title: WIP: Add management command to create the email opt-in list.

This is the first part of [ECOM-689](https://openedx.atlassian.net/browse/ECOM-689).

Outstanding issues:

1) Need to verify with @griffresch and @shnayder what the expected behavior is for users who have unenrolled from every course in an org. In this implementation, they're excluded from the output entirely.

2) We'll need to integrate this into the analytics-exporter code. That code already knows the aliases for each org and any restrictions on which courses are used in the report, so we'd need to pass that config to this command when executing it.

3) I haven't yet tested this on a dataset larger than 8,000 enrollments.

Reviewers: @stephensanchez @brianhw