The legislation would ban sex education courses from discussing methods of obtaining or using contraceptives.