There was apparently a better choice than CTB McGraw-Hill to oversee the new electronic grading system that this week faltered in spectacular fashion: Pearson.

But Pearson’s services could have cost the city nearly three times as much as McGraw-Hill’s, a bargain that the Department of Education concluded was worth the risk, according to details about the contract submitted to the Panel for Educational Policy for approval last year.

“The near-term advantages achieved from Pearson’s proposal did not warrant its significantly higher cost,” the contract document says.

A litte more than a year after the city inked the contract — a three-year, $9.7 million deal — the ambitious scoring system developed by McGraw-Hill is under fire for a series of sweeping technical glitches that has left tens of thousands of students wondering how they did on their end-of-year state exams. Many of those students are seniors whose graduation is contingent on passing the exams even as ceremonies began this week.

“I’ve been doing grading for 18 years and this is the absolute worst,” said Dino Sferrazza, a social studies teacher at Benjamin Cardozo High School.

Prior to this year, teachers graded their own students’ exams, a practice that the state barred amid concerns that it contributed to a disproportionate bulge of scores at just above passing. In response, the city sought a contractor to help create an online distributed scoring system to make grading more efficient and accurate.

Pearson and McGraw-Hill both made it to the final round of the procurement process, but Pearson, an established distributed scoring provider, was better equipped to deliver the web application services required to do the job, a committee that reviewed both proposals concluded. CTB, however, promised to develop a web application similar to the one Pearson offered. It told the city that it would take six months to build, a timeline that the department deemed “satisfactory.”

The Panel for Educational Policy approved the contract in April 2012 — at the same raucous meeting where it voted to close and reopen dozens of schools. The contract’s request for proposal and its description are posted online. The actual contract is registered and filed with Comptroller John Liu’s office, but a spokesman said it wasn’t “ready” to be released publicly yet.

Pearson has had its own issues with administering tests in both the city and the state. After beating out McGraw-Hill for a $32 million contract to create new state assessments for elementary and middle schools, Pearson badly bungled some of the questions last year and mishandled the grading for the city’s gifted and talented tests. Pearson’s initial offer for the electronic scoring process was nearly $66 million compared to McGraw-Hill’s $24 million bid.

The documents reveal that the city had ambitious hopes for the program, which was designed to provide an accurate and efficient way to grade open-ended test questions. With fewer multiple choice questions on new tests aligned to new Common Core standards, the city sought to make the process faster than manually-graded answer sheets as well.

The original terms were to use McGraw-Hill for Regents grading and to fund it with Race to the Top dollars. But a provision allowed the city to grade all of its state tests electronically, potentially doubling the cost in city funds — “if it is clear that there are cost and efficiency gains over our current manual scoring systems.”

PEP McGraw Hill Contract by GothamSchools.org