The teen and a classmate used AI to prepare “the initial outline and research” for their project on NBA Hall of Famer Kareem Abdul-Jabbar’s civil rights activism, according to the parents’ lawsuit. And during testimony, the 17-year-old student told the court his course load has been demanding.

“I’ve taken a really hard course load to prepare myself for college,” he said.

The student said he currently holds a 4.3 GPA and that last fall around the time the project started, “it was a little higher than that.”

He “did not remember” his teacher communicating anything about the use of AI when the project was assigned, though he had received guidance about the use of AI in an English class, he said.

The use of AI “was definitely allowed and could be used in that [English] class,” the teen said.

The lawsuit contends that the teen and a fellow classmate did not get beyond the initial segment of the social studies project because their teacher, Susan Petrie, accused them of using AI, and “thus cheating” on the assignment.

Petrie testified Tuesday she used Turnitin.com and ChatZero, as well as an online tool called Draftback, to check for plagiarism and any AI-generated content.

She said that while most students spent an average of several hours in a Google doc as they conducted research, the student in question and his partner spent roughly 52 minutes, suggesting large portions of the work had been cut and pasted.

Asked if the student and his partner had cited AI in their work, Petrie said, “There is no citation to any AI source.”

At one point, the student indicated that some of the material came from an AI writing assistance program known as Grammarly, which he hadn’t cited in his work, she said.

“If you don’t say where your information is coming from, no matter where it is, it’s not your information, that’s plagiarism, and that’s what happened in this case,” Petrie said.

The student, referred to in federal court documents as R.N.H., ultimately received a D letter grade on the project, which hurt his grade point average and his college prospects, according to his parents’ complaint. The teen and his classmate were also forced to attend a Saturday detention session.

Time is of the essence for a court order, the teen’s parents argued in court papers, as he is applying to elite colleges and universities, and the process for early admissions start in October.

The parents met with social studies department director Andrew Hoey and another official to voice their concerns about their son’s punishment, which included being barred from joining the National Honor Society, according to court papers.

They want the judge to order school officials to “immediately repair, restore and rectify Plaintiff Student’s letter grade in Social Studies to a grade of ‘B,’” the grade he held before the D on the Abdul-Jabbar project, according to court papers.

“Absent the grant of an injunction by this Court, the Student will suffer irreparable harm that is imminent,” they wrote in court papers.

Levenson indicated it could take time for him to make a decision, pointing to several hundred pages of evidentiary and briefing material in the case to review.

”I don’t think there’s any likelihood that I’m going to be issuing a preliminary injunction in favor of the plaintiffs in the next two weeks,” the judge said.

Shortly after 2 p.m., the student’s attorney asked Levenson if the student could be excused for a soccer game, and the judge obliged. The teen and his father declined to comment outside court.

For much of the afternoon, the teen’s lawyer, Peter S. Farrell, and Levenson wrangled over whether the court has the authority to intervene in the school officials’ academic policy decisions. Farrell argued that his client’s discipline was arbitrary because the school’s policy manual didn’t spell out clear rules governing the use of AI.

At one point, Levenson asked Farrell, “Are you saying that this student had no way of knowing that using ChatGPT to generate chunks of text, and copy text [into] a document … would be deemed by administrators as not his own work?”

“I’m saying [the] administrators have it wrong,” Farrell replied.

Gareth W. Notis, an attorney for school officials, argued that teachers and administrators should have the discretion to make decisions on academic integrity.

”This student copied and pasted large amounts of content, put it into a paper and did not give recognition to the source,” Notis said. “It meets the definition of plagiarism in the handbook.”

In an Oct. 8 motion to dismiss the suit, lawyers for the school system said the student received a “relatively lenient and measured discipline for a serious infraction. … The discipline was consistent with the applicable Student Handbook.”

On Tuesday, Acting Superintendent Kathryn Roberts took the stand and explained how all Hingham High School students in grades 9 to 12 are provided AI guidelines each year and those guidelines aren’t just only supposed to apply to English class assignments.

“The intent is for the core instruction around the use of AI and academic integrity in the same way, like grammar, for example, would be taught in English class with an expectation of transferability to other disciplines,” Roberts said.

Travis Andersen of the Globe staff contributed to this report.

Emily Sweeney can be reached at emily.sweeney@globe.com. Follow her @emilysweeney and on Instagram @emilysweeney22. John Hilliard can be reached at john.hilliard@globe.com.