MDL-58659 course: Add missing enddate field in get_courses_by_field