D.C. public middle schools gained additional teachers this year, and dozens of schools got new computers and technology coaches. At Truesdell Education Campus in Ward 4, students are coming to school early or staying late for extracurricular activities that did not fit into the school day.

The new staffing, updated technology and longer school day are thanks to an infusion of funds that D.C. schools received this year for the city’s most at-risk students.

The D.C. Council approved $80 million to serve the needs of 36,000 students who are in foster care or are homeless, who are receiving welfare benefits or food stamps, or who are performing at least a year behind in high school. That’s about 40 percent of all of the city’s public school students.

“We know poverty affects the way children can succeed in school,” said Soumya Bhat, education finance and policy analyst for the D.C. Fiscal Policy Institute. “Children are more likely to come to school hungry or to be exposed to trauma or have health problems.”

The extra funding — $2,079 per eligible student — is meant to be a “reliable, stable source of funding” that schools can plan on to help mitigate the effects of poverty, Bhat said.

In the first year, D.C. charter schools are receiving the extra funds as part of per-pupil funding, as the law requires. But for D.C. public schools, the money was not apportioned according to school enrollment. Since the bill was passed late in the year, the funds were used to support Chancellor Kaya Henderson’s priorities, including improving middle schools, refining literacy instruction in low-performing schools and boosting student satisfaction.

John Davis, chief of schools, said that although the school district used its discretion, the spending “lines up with kids who are absolutely at risk,” he said.

The largest investments went to middle schools:

●The District spent $8 million to hire more than 80 teachers in the middle grades for newly required classes meant to ensure that schools have a base line of art, music, social studies and physical education. This has been challenging, especially for smaller schools or education campuses with low enrollments in middle grades.

●More than $4 million went to hire counselors, social workers and other staff to provide more social and emotional support to middle school students.

●To increase student satisfaction, the District invested $2.7 million in field trips, excursions and enrichment activities, such as clubs, sports and music for the middle grades.

●The school system spent an additional $4.7 million on its “Proving What’s Possible” initiative for programs designed to help students systemwide enjoy school more. The District funded after-school clubs, newspapers and field trips, and ­anti-bullying initiatives.

“We want students to love school, be proud of their school, and feel great about what their school has to offer,” Henderson said in a statement.

For the District’s lowest-performing schools, officials funded $2.5 million for reading specialists and a new reading intervention program.

And more than $5 million went to extend the school day in schools that opted to participate. The chancellor has been pushing for longer days to boost achievement, and this year, 26 schools, including Truesdell, signed on.

That extra hour gave students a way to keep playing in the band, which was close to getting squeezed out of the school day. But with the promise of extra funding, the band director agreed to come in an hour early. Now dozens of students have a noisy start to the day and a chance to play in an all-city band.

Truesdell Principal Mary Ann Stinson said her students were able to choose what they wanted to do with their “Proving What’s Possible” funds. In a survey, iPads beat out extra sports teams or robotics club. She plans to spend the money on technology so that students can each have a computer to use during the day.

The school also received funds for trips for its middle schoolers. Teachers are considering an overnight camping trip for one class, an excursion to New York City for another and a college tour in New England for eighth-graders.

Unlike Truesdell, some elementary schools or high schools that serve high-poverty communities did not initially see an increase this year, because of the way money was distributed and because separate funding for summer school was eliminated. The D.C. Council restored some of those funds with additional allotments for three dozen schools, ranging from $14,000 to $236,500, that were mostly used to pay for computers or technology coaches.

The fair-funding bill was introduced last year by D.C. Council member David A. Catania (I-At Large), chairman of the education committee, and approved unanimously by the board. At the same time, a study commissioned by the deputy mayor for education also recommended adding a new “at risk “ category in addition to extra funds that flow to students receiving special education and learning English.

As Henderson begins assembling budget priorities for the new year, Bhat said she hopes the District can maintain its investments in middle schools and accelerate high school improvements, as the chancellor has promised, while also funding schools according to their at-risk populations.

“We just want to make sure that these resources are targeted to the students that need them most,” Bhat said.