Legislature passes bill allowing chaplains in public schools