MDL-66359 core_course: Modify get_enrolled_users_by_cmid