Going to class is not required to receive a city diploma.

It’s not widely advertised, but under Department of Education rules, students cannot be denied credit or graduation “based on lack of seat time alone.”

Under state law, school districts may adopt a “minimum attendance standard.” New York City does not. While city schools must take attendance, kids can still pass or be promoted even if chronically absent, which is missing more than 10 percent of days.

Instead, students who “meet class expectations” must receive credit, and “are not required to make up the exact hours of missed class time,” the DOE says. NYC students need 44 credits to graduate.

The loose policy — each school defines it’s own “expectations” — leaves room for dishonest educators to let truants skate by with minimal make-up work in English, math and other core subjects, experts say.

Maspeth High School, currently under investigation by the Queens District Attorney’s office and the DOE, has exploited this loophole by giving “worksheets” to teens who have missed months of classes. Expectations are low.

“If students hand in anything, whether it’s correct or not, you have to pass them,” said one of multiple Maspeth whistleblowers who described pressure by administrators to pass kids who do not earn it.

One class-cutter filled in work sheets with “random nonsense” but still received a passing grade and credit, his teacher said.

Another teacher sarcastically titled a student’s make-up assignment: “I was absent the entire year and need to learn everything to pass the Regents’ packet.” It was spotted in the school’s trash.

Four Maspeth students marked absent for four to five months straight this year graduated after showing up once a week to turn in worksheets to a dean. They all received Regents diplomas and were invited to join the June commencement ceremony, records show.

Ex-student Thomas Creighton told The Post he spent 11th- and 12th grades drunk or stoned, and blew off his studies. Finally, he said, the school gave him “a few work sheets” to complete in a week. He had a pal fill them in, and received a diploma six months early. When his worried parents asked to see his work, the school had nothing to show, but insisted Thomas earned a passing 65 in all classes.

The alleged abuses at Maspeth — which touts a 99 percent graduation rate — are extreme, but teachers at other high schools witness similar shortcuts.

“It’s going on all over the city,” said a teacher who recently left DeWitt Clinton High School in the Bronx.

“If the student comes in at the end of the year in June and asks for makeup work, we have to provide it — even if they never attended.”

Teachers get no guidance on what to include, the staffer said. “There are no standards for what a make-up packet has to look like — nothing.”

Kids who do come to class and work hard “know there’s something wrong when people they haven’t seen all year move through the grades with them or receive credit. It sets a very low bar for all students.”

At Forest Hills High School in Queens, failing teens get a last chance to pass by showing up for “academic boot camp.” The teens sit in a classroom several hours a day for five days at the end of the school year.

“They could skip class most of the year and not deserve a grade, but as a result of attending one week and doing work sheets, they could get credit for an entire year’s class,” a Forest Hills teacher said.

The teacher sent students to boot camp, but did not provide any work for them — and did not grade their work — so doesn’t know whether the students learned anything.

“I think it’s fraudulent,” the teacher said.

After The Post and other media exposed a massive grade-fixing scheme called “Project Graduation” at Dewey High School in Brooklyn, a 2015 DOE probe confirmed that students lacking credits were put in bogus classes and given work “packets” without instruction by certified teachers, as required by law. Kids dubbed it “Easy Pass,” but were robbed of an education, a state audit found.

In 2011, then-state Education Commissioner John King asked the state Board of Regents to consider letting students earn credit “through competency-based activities, not seat time.” Classes consist of 180 minutes of instruction per week.

King did not return a request for comment. A state Education Department spokeswoman said no action was taken, but confirms that students who lack class attendance can still earn credits by showing “mastery” or “proficiency,” regardless of attendance.

Under old DOE Chancellor’s regulations, promotion decisions were based on a “comprehensive assessment,” including whether a student had 90 percent attendance. The attendance part was dropped in 2009, officials said.

DOE spokeswoman Danielle Filson said students who miss class “are given opportunities to make up the work to demonstrate mastery of content.”

But it’s up to each school to define mastery and decide how rigorous the make-up work should be.

That leaves the door wide open for abuse, said Brooklyn College and CUNY Grad Center education professor David Bloomfield.

“The DOE is responsible for quality control, but the city seems complicit in these practices as a way to raise the graduation rate,” Bloomfield said. “The repeated scandals are the worst kind of Groundhog Day.”

In 2015, ex-Chancellor Carmen Fariña announced a $5 million “Regulatory Task Force on Academic Policy” to guard against grade-fixing and credit fraud after a series of schemes were exposed in The Post. The panel last filed a brief two-page report in June 2017, and the DOE gave no update.

The DOE’s Filson denied that guidelines are lax.

“All instruction must meet rigorous standards and we have a strict academic policy citywide to ensure our students are challenged and meet their full potential.”