WL-172 Show a Order History list on the Student Dashboard for any PaidCo...

...urseRegistration or RegCodeItem that the user might have purchased
It's possible that there could be (in the future) a order_item subclass which does not contain a course_id field, which would cause this to crash. So I'd suggest that, you do something like:

order_item_course_id = getattr(order_item, 'course_id', None)

And then compare against that.