The governing board of a school district may exempt any four-year or senior high school pupil from attending courses of physical education, if the pupil is engaged in a regular school-sponsored interscholastic athletic program carried on wholly or partially after regular school hours.