ALBANY — New York lawmakers worked toward the end of their six-month session Thursday night, churning through scores of bills and announcing last-minute deals to authorize medical marijuana and provide a safety net for teachers worried about being judged for student performance on the new Common Core standards.

The Legislature planned to end its six-month session late Thursday or early Friday.

The medical marijuana legislation crafted by Gov. Andrew Cuomo and top lawmakers would create a regulated system to dispense non-smokeable marijuana to qualifying patients. The measure was expected to pass late Thursday.

Lawmakers were also expected to consider the Democratic governor's proposal to prevent teachers from being fired over poor student scores on tests based on the controversial Common Core standards. Teachers have complained that implementation of the new standards was rushed.

Other measures awaiting approval included a series of bills intended to combat the rise in heroin overdoses. The proposals include a requirement for insurance companies to better cover substance-abuse treatment and harsher penalties for those who distribute the drug.

Cuomo said medical marijuana, the heroin proposal and the teacher evaluation bill were his three top priorities going into the final days of the session.

"We're three for three this week," he told reporters Thursday. "Obviously there's always more to do, but it's been a very good week."

Several high-profile bills didn't make the final cut, including ones that would raise the minimum wage, create broad public campaign financing and extend financial aid to students in the country illegally.

A series of proposals known as the women's equality agenda also seemed doomed late Thursday, a casualty of a standoff between the Assembly and Senate.

For the second year, a legislative standoff related to abortion derailed a 10-point package of women's equality bills that include measures to combat human trafficking and help domestic violence victims. Senate leaders oppose a provision that would codify abortion rights, but Assembly leaders have so far balked at calls to divide the package to allow separate votes on each provision.

Assemblywoman Amy Paulin, D-Scarsdale, supports all 10 of the measures but had called for separate votes when it became clear the other measures would otherwise pass. She said she's frustrated that the bills — such as the one toughening penalties for sex trafficking — again languished despite broad support.

"The public is not going to understand this, how this happened," she said.