BELCHERTOWN - The violent altercation that resulted in a shelter-in-place order at the University of Massachusetts Amherst Feb. 18 occurred after two Framingham men tried to sell a student "shredded vegetables" when he thought he was buying marijuana, according to the Northwestern district attorney's office.

"An altercation ensued when their ruse failed," Mary Carey, a spokeswoman for the district attorney, said in a statement Tuesday.

The details about the allegedly phony pot came out at the bail hearing Tuesday of the second defendant in the case, Shawn Wyatt, 22.

Wyatt, 22, of Framingham, has pleaded not guilty to charges of armed robbery, assault and battery with a dangerous weapon, and assault and battery.

In Eastern Hampshire District Court Tuesday, a judge set bail for Wyatt at $15,000.

Carey said that if Wyatt is able to make bail, he will be required to stay away from the UMass Amherst campus, the student he is accused of assaulting, and his co-defendant, William McKeown, 19, also of Framingham.

Wyatt is also required to remain drug and alcohol free, submit to random substance screenings and report to his probation officer weekly. He is not permitted to leave the state.

His attorney, John Drake of Northampton, had asked for $7,500 bail, while First Assistant Northwestern District Attorney had recommended $25,000 bail.

Wyatt and McKeown are accused of assaulting UMass student Vedant Rathi Feb. 18 during a drug deal that went south. Witnesses told police that the two men took Rathi's money without giving him drugs, and then beat him, including a blow with a BB gun.

McKeown was arrested the day after, thanks to a student at UMass who told police his name, according to court records. McKeown then identified his accomplice to police as Shawn Wyatt, court documents show.

Wyatt was arrested March 15 and arraigned March 16.

McKeown, whose previous criminal record included only a charge of negligent operation of a motor vehicle, is out on $7,500 bail on the condition that he remain on house arrest.

Wyatt has a criminal record that includes nine arrests, including drug, weapons, and assault and battery charges.