Currently there is a school in Pennsylvania that is entertaining making it against the rules for parents to have lunch with their kids on the school premises if they bring in unhealthy fast food.
Of course, their logic is that schools should teach students to live healthy lifestyles and make healthy choices. But this is not what is being taught by example. By example, this ruling would be showing children that the state defines what a good choice is and has the power to ensure that we make that choice. It teaches that experts are better able to decide what is better for the lowly pedestrian subject who claims ownership to his own body. (and by extension his family and property)
This approach would however work better teaching a subject like mathematics. Even though math is a very important subject, in my high school they did not force everyone to learn algebra. Instead they re-invented pre-college mathematics through storytelling and arts and crafts. How can we give students a free hand to make their own choices about the correct answer to a math problem through creative writing( which many modern high school math courses emphasize opinion over fact as mine did), and then act like tyrants when it comes to personal choices where opinion actually matters.
The role of the school in this matter should be EDUCATION. Teach mandatory courses about nutrition and the possible consequences of lifestyle choices. Maintain a mandatory year-round physical education curriculum. Let the life they live be the final exam.