A federal judge in Ohio ruled Tuesday that a university violated a student's constitutional rights when it required him to show his bedroom before taking an online test, possibly setting a precedent over privacy concerns. 

The ruling came after Aaron Ogletree, a student at Cleveland State University, filed a lawsuit against the school last year over the policy, which was aimed at preventing cheating.

He was required to use a webcam to show his bedroom before taking a chemistry test. In his ruling, U.S. District Judge J. Philip Calabrese appears to set a precedent regarding student privacy rights, Ogletree's lawyer, Matthew Besser, said.

PENNSYLVANIA JUDGE PROMISES TO MOVE QUICKLY REGARDING MAIL-IN BALLOT DISPUTE

Cleveland State university lawsuit

A federal judge in Ohio said Cleveland State University violated a student's Fourth Amendment right to privacy when he was required to use a webcam to show his bedroom before taking an online test. (Cleveland State University)

"Freedom from government intrusion into our homes is the very core of what the Fourth Amendment protects," Besser said. "If there is any place where students have a reasonable expectation of privacy, it’s in their homes."

Ogletree initially protested by scanning his room anyway over fears of receiving a failing grade. The room scans were visible to other students and were left to the discretion of professors, the lawsuit said. 

Calabrese in his ruling ordered Besser and attorneys for Cleveland State to meet to determine what the next step in the case will be. He said in the order that Ogletree’s right to privacy "outweighs Cleveland State’s interests in scanning his room."

Fox News has reached out to the university. 

CLICK HERE TO GET THE FOX NEWS APP

The Associated Press contributed to this report.