The board of any district operating a flexible learning year program in one or more of the facilities within the district must divide the students of each selected facility into as many groups as necessary to accommodate this program. Students of the same family must be placed in the same group unless one or more of these students is enrolled in a special education class or unless the parent or guardian of these students requests that the students be placed in different groups. No board may discriminate on the basis of race, color, creed, religion, marital status, status with regard to public assistance, sex, or national origin when assigning pupils to attendance groups pursuant to this section.