It is unlawful for any pupil who is registered in and attending any high school, district, primary, or graded school which is partially or wholly maintained by public funds to join or become a member of any secret fraternity, sorority, or society wholly or partially formed from the membership of pupils attending any such schools or to belong to or to take part in the organization or formation of any fraternity, sorority, or society, except such societies or associations as shall be sanctioned by the board of directors of the school districts wherein such schools are maintained.