The system is one of the poorest in the state. More than a third of its 1,600 students are eligible for free or reduced-cost lunches, and that figure would no doubt be higher if some families whose children need free lunches to eat nutritiously were not too ashamed to apply for it.

Impoverished districts like Ilion, which has an eroding tax base and relies on the state for more than three-quarters of its budget, were supposed to fare better after a 2006 court ruling that ordered the state to give each district enough money to provide every child with a “sound basic education.”

Under a new formula created by the Legislature, some of the poorest districts were promised as much as an 80 percent increase. The increases were to be phased in over four years in steadily larger amounts. Ilion, which had been promised a 35 percent increase, got a modest boost in the first two years. But then the state ran into fiscal trouble; funding was kept flat in 2009 and cut in 2010. Like many other poor districts, Ilion retrenched. It laid off teachers and backed down from plans to expand its course offerings.

Thanks to an ambitious school building program carried out by the state, Ilion’s low-rise brick high school is in great shape and indistinguishable from similar buildings even in wealthier communities. The course offerings tell another story. The school offers only one foreign language, Spanish, and is unlikely to offer any others until and if the economic climate improves. As a result, a transfer student who was seeking a third year of French has had to take the course online.

The school offers only four of the possible 34 Advanced Placement courses, which allow students to earn college credit in high school. The Advanced Placement course in biology was particularly hard won: school officials said they had to “steal nickels here and there” to buy microscopes and other material necessary to run the course, which is certified and overseen by the College Board.