Use bulk operations on get_course_by_id and courseware