diff --git a/src/exams/pdf/details/radial.result.tsx b/src/exams/pdf/details/radial.result.tsx index e5aa62db..38b1b5c3 100644 --- a/src/exams/pdf/details/radial.result.tsx +++ b/src/exams/pdf/details/radial.result.tsx @@ -10,7 +10,7 @@ export const RadialResult = ({module, score, total, png}: ModuleScore) => ( {module} - {score.toFixed(2)} + {Math.floor(score)} out of {total} diff --git a/src/pages/api/assignments/[id]/export.tsx b/src/pages/api/assignments/[id]/export.tsx index 91b24506..a7e75de7 100644 --- a/src/pages/api/assignments/[id]/export.tsx +++ b/src/pages/api/assignments/[id]/export.tsx @@ -370,7 +370,7 @@ async function post(req: NextApiRequest, res: NextApiResponse) { studentsData={studentsData} showLevel={showLevel} summaryPNG={overallPNG} - summaryScore={`${(overallResult * 100).toFixed(0)}%`} + summaryScore={`${Math.floor(overallResult * 100)}%`} groupScoreSummary={groupScoreSummary} passportId={demographicInformation?.passport_id || ""} />, diff --git a/src/pages/api/stats/[id]/export.tsx b/src/pages/api/stats/[id]/export.tsx index 657cb361..3b77020f 100644 --- a/src/pages/api/stats/[id]/export.tsx +++ b/src/pages/api/stats/[id]/export.tsx @@ -136,14 +136,14 @@ async function post(req: NextApiRequest, res: NextApiResponse) { const userId = stats[statIndex].user; - if (hasPDF) { - // if it does, return the pdf url - const fileRef = ref(storage, hasPDF.pdf.path); - const url = await getDownloadURL(fileRef); + // if (hasPDF) { + // // if it does, return the pdf url + // const fileRef = ref(storage, hasPDF.pdf.path); + // const url = await getDownloadURL(fileRef); - res.status(200).end(url); - return; - } + // res.status(200).end(url); + // return; + // } try { // generate the pdf report @@ -286,7 +286,7 @@ async function post(req: NextApiRequest, res: NextApiResponse) { logo={"public/logo_title.png"} qrcode={qrcode} summaryPNG={overallPNG} - summaryScore={`${(overallResult * 100).toFixed(0)}%`} + summaryScore={`${Math.floor(overallResult * 100)}%`} passportId={demographicInformation?.passport_id || ""} />, );