Tony Kaye’s second film—following the raw but wrenching “American History X” (1998), which Kaye had problems getting into final form (leading to disputes with his producers and distributor, as well as star Edward Norton)—is a similarly uneven but intermittently powerful study of the chaos that reigns in a troubled NYC school. What’s good about it is that it spares nobody—administrators, instructors, students, parents—while avoiding the frequently-repeated sentimental drivel about at-risk kids responding to the encouragement of dedicated, hard-driving mentors. What’s bad is that it’s unable to escape a preachy tone, exacerbated by writer Carl Lund’s tendency to pontificate in direct-address speeches to the audience and by the director’s hyperbolic style. On the other hand, the topicality of the theme can’t be gainsaid, and Adrien Brody’s committed lead performance, along with a stellar supporting cast, brings undeniable intensity to the material.

Brody plays Henry Barthes, a substitute teacher who’s brought to the inner-city school run by harried principal Carol Dearden (Marcia Gay Harden) for a month-long stint in an English classroom. Most of the students are angry, disobedient and contemptuous, and virtually all the staff demoralized and beaten down, including Dearden, who’s being pressured to retire, the powers-that-be looking to close the place down and sell off the property to land-hungry developers.

As Barthes informs us in the excerpts from his direct-to-you speech that periodically interrupt the narrative (along with forbidding bits of blackboard animation depicting the violent ambiance), the only way he’s found to survive the environment is to remain emotionally unconnected from it. But of course he can’t, either on the job or in his personal life. So he’s inevitably drawn to protect and nurture a bright, but overweight and bullied girl named Michelle (Betty Kaye) who—we learn in a quasi-flashback to her home—is verbally abused by her father, too. Meanwhile he’s trying to cope with the long decline of his grandfather (Louis Zorich), suffering from dementia and in a nursing home, even though the old man apparently did something awful in the distant past that led Henry’s mother to kill herself. And Barthes abruptly takes under his wing Erica (Sami Gayle), a young prostitute to whom he gives shelter and tries to rescue—a rather clear instance of his violating the principle of detachment.

Surrounding Barthes is a sea of angst among his colleagues, played with relish by the likes of Tim Blake Nelson, Christina Hendricks, Lucy Liu, William Petersen and Blythe Danner. All are defeated, and some (Liu and Nelson in particular) are provided with showy scenes to italicize the depth of their disillusionment. In some cases we even follow them home to feel the lack of empathy they find there—Blake’s Mr. Wlatt is as much ignored by his wife and son as by his students, while Dearden is treated by her husband (Bryan Cranston) with sarcasm. The only teacher who’s managed to avoid the professional meltdown is James Caan, as a veteran who combines that sense of detachment Barthes merely talks about with a penchant for mordant humor.

But he’s hardly a hero. Throughout the film Lund’s indictment of a system of education that shortchanges everybody, sometimes with lethal results, is clear, and he finds everyone culpable, though the demanding but clueless parents and angry, contemptuous students (except for the sensitive Michelle) receive less footage than the hapless teachers. But his passion often overcomes his judgment, and his script too often descends into verbal rants and implausibility. The entire Erica episode falls into the latter category, and it’s telling that the only experience that offers Henry a degree of hope and redemption is an off-campus encounter. He may not be able to save a student, but he can rescue a streetwalker.

Rather than moderating Lund’s rage, meanwhile, Kaye italicizes it with cinematic flourishes and overwrought imagery. His volatile, anything-for-an-effect technique gilds the lily, though as his own cameraman (and with the aid of editors Barry Alexander Brown and Geoffrey Richman) he certainly realizes his rather florid vision.

One can agree with Lund and Kaye about the sorry state of public education without overlooking the dramatic inadequacies in their highly-charged portrayal of it in a film that, in line with the title, might itself have benefited from a bit of detachment and restraint.