Updated the grading system to work based on entities
This commit is contained in:
@@ -8,7 +8,7 @@ import { calculateBandScore, getGradingLabel } from "@/utils/score";
|
||||
import clsx from "clsx";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { Fragment, useEffect, useState } from "react";
|
||||
import { Fragment, useEffect, useMemo, useState } from "react";
|
||||
import {
|
||||
BsArrowCounterclockwise,
|
||||
BsBan,
|
||||
@@ -59,7 +59,9 @@ export default function Finish({ user, scores, modules, information, solutions,
|
||||
|
||||
const aiUsage = Math.round(ai_usage(solutions) * 100);
|
||||
const exams = useExamStore((state) => state.exams);
|
||||
const { gradingSystem } = useGradingSystem();
|
||||
|
||||
const entity = useMemo(() => assignment?.entity || user.entities[0]?.id || "", [assignment?.entity, user.entities])
|
||||
const { gradingSystem } = useGradingSystem(entity);
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user