No teacher shall dismiss pupils during school hours or close the school during school hours, except in an emergency, without the consent of the board of school trustees or the county superintendent of education.