Extend preview to support cohorted courseware

This is a version of #6140, on top of Jim's access control PR.
I think you can collapse the above three lines into `self.assertItemsEqual(expected_items, actual_items)`.