Cdodge/fix crash on course not found

@mattdrayer this fixes the situation where a course in which a user was enrolled, but now the course no longer exists in the database. This is actually a frequent case and is likewise handled in the Open edX dashboard.