Added asserts to ensure course_ids are course key objects.