Many thought lead in drinking water was a problem of the past — until the water contamination crisis in Flint, Michigan, a few years back.

And then a U.S. Government Accountability Office survey polled school districts across the country on testing for lead in drinking water in 2017. Fewer than half of those surveyed did testing; of those that did, more than a third found elevated levels.

And a more recent report, “Get the Lead Out,” from the Environment America Research and Policy Center gave Pennsylvania an F for having no requirements that schools address lead in drinking water.

This year, however, school districts across Pennsylvania will have to test for lead in drinking water — or inform the community they will not — according to an amended school code that’s part of the new state budget.

The school code changes push all facilities — including charters, cyber charters, and intermediate units — to analyze their water supplies.

The language in the school code was based on a bill from state Sen. Art Haywood, who started working on the issue after visiting Flint during its water crisis in 2014.

Haywood, a Democrat who represents parts of Philadelphia and Montgomery County, wanted testing to be mandatory, but some of his colleagues were concerned about the costs of such a directive.

“My position is that the cost to our communities and our children of having the lead ingested is a much higher cost than doing testing,” he said.

So, lawmakers ended up with a compromise, he said.

“It is a first step toward a more comprehensive legislation, and it is a way to require this testing this school year, 2018-2019,” Haywood said.

Haywood plans to work with other lawmakers on a mandatory testing measure that would include state funding for the analysis. State Reps. Karen Boback, R-Luzerne, and Bryan Cutler, R-Lancaster, have bills pending in the House.

Philadelphia City Council passed an ordinance at the end of 2016 that requires the city school district to test for lead in drinking water and require city certification.

Other Pennsylvania schools have done some testing, but not enough to grasp the scope of the problem, said Stephanie Wein, a clean water conservation advocate with Penn Environment.

“We know it’s widespread, but we actually need to get out there to see how bad it really is,” she said. “We’re an old state, so we have a lot of old buildings.”

Old buildings often have lead pipes and plumbing that carry — and contaminate — drinking water.

“Pennsylvania actually topped the national list for a number of instances of elevated lead in the water of daycare and elementary schools,” Wein said of a USA Today investigation in 2016.

“So what we know is just the tip of the iceberg.”

After testing, Wein said, it’s vital to let parents know if their kids are exposed to the toxic metal that can lower IQ and academic achievement — even at very low levels.

“It just shocks every parent I talk to that there are no federal requirements for testing or reporting for lead in drinking water for schools, and no legal threshold for this neurotoxin in the very places our kids go to learn and grow,” she said.

Disclosure needs to be mandatory, Wein said, adding that, nationally, only 59 percent parents were informed of what districts found. Even if school districts are testing, they aren’t “necessarily telling the parents what’s in the water.”

Wein described the solution is an three-pronged approach — test, tell, and treat.

“You need to bring down lead levels when you find that they’re high. It doesn’t mean we need to rip up every pipe. A lot of school districts can’t afford that, but installing lead-certified filters to bring the level down in the water is a really pretty cost-effective solution,” she said.