Adam/generalized draft import export 2

@dmitchell -- is this the right idea?

https://openedx.atlassian.net/browse/TNL-574
I don't understand why this code (and the test that uses it) is in this PR. How is it related to this bug fix?