For all of last school year, special-education teacher vacancies at Mastbaum High School meant freshman Justine Cappetti struggled.

Because some special-ed positions remained open all year, there weren't enough supports to fulfill the terms of her individualized education plan, a legal document crafted for all special-ed students.

As a result, Justine barely passed math. The situation was a weight on the family.

"She was stressed a lot," said Justine's mother, Millie Cappetti.

She wasn't alone.

Lingering teacher vacancies were a real problem in the Philadelphia School District last year, with thousands of students lacking a classroom teacher for a significant part of the term.

In response, the state Department of Education recently ordered the district to provide "compensatory education to remedy the educational loss" suffered by special-education students at Mastbaum and eight other schools citywide. The total cost to the district is yet unknown.

City Councilwoman Helen Gym, a longtime public education activist, lodged a state complaint against the district this summer.

Compensatory education was ordered earlier this year at one other school, Roosevelt Elementary in Germantown, as first reported by the Public School Notebook.

The vacancy issue is serious, Gym said, with wide-ranging consequences for students and now potentially for the school district.

"This is the central mission of the School District of Philadelphia, to put a teacher in front of every child in the city," Gym said. "I feel like that's fallen apart."

Schools spokesman Kevin Geary said the district takes the issue seriously, and had taken steps to help families affected by vacancies. Schools around the country are having a tough time filling special-education jobs, he noted.

"Nothing is more important than making sure all students have the learning opportunities they deserve," Geary said in a statement. "When there are teacher absences or teacher vacancies, the school district works hard to fill them."

He said the district, which offered summer school opportunities to students affected by vacancies, would soon determine the number of hours owed each student, then meet with families. Eventually, they will be offered tutoring services from four companies around the city.

The district has fewer lingering vacancies this year, Geary said, and has hired some special-education teachers to fill open jobs on a contract basis, as it did last year.

Four of the schools cited by the state still have special-education jobs open, Gym said.

Millie Cappetti, who reached out to Gym about the vacancies at Mastbaum, isn't much comforted by the promise of help to make up for last year.

"The district failed our students once again," she said. "Parents shouldn't have to fight for an education for our children, but we do. It shouldn't be a battle every year."

Cappetti doesn't fault the Mastbaum staff, who worked hard to fill in the gaps for students despite some of the worst overcrowding in the city - one teacher had 77 students jammed into one class well into October last year. The principal taught an enrichment class himself, and teachers went out of their way to help Justine as much as they could, her mother said.

"If it wasn't for her regular math teacher, she wouldn't have passed math at all," Millie Cappetti said. "He stayed Monday through Friday with her after school, working with her on math."

For the district, the fallout could widen.

Gym recently sent a letter to the Department of Education asking them to widen their examination, holding that a substitute-teaching crisis last year also deprived students of an education in many schools.

A now-cancelled contract with Source4Teachers, a New Jersey staffing firm, meant that many schools rarely had teachers to fill open daily and long-term vacancies. At some schools, the rate of positions filled was in the single digits, according to statistics cited by Gym.

At Blaine Elementary, 98 percent of substitute jobs were unfilled; at Edison High, 90 percent were unfilled; at Solis-Cohen Elementary, 38 percent of positions were never staffed; and at Wagner Middle School, 94 percent of substitute jobs went unfilled.

Gym said she's pleased that vacancies are down this year, but said she and others will be watching the human-resources situation closely.

"These are children's lives, and we need to understand that every number impacts a child, a school, and a family," she said.