Unfinished grading attempt at solving it
This commit is contained in:
@@ -22,7 +22,6 @@ import ShortUniqueId from "short-unique-id";
|
||||
import { ExamProps } from "@/exams/types";
|
||||
import useExamStore from "@/stores/exam";
|
||||
import useEvaluationPolling from "@/hooks/useEvaluationPolling";
|
||||
import PracticeModal from "@/components/PracticeModal";
|
||||
|
||||
interface Props {
|
||||
page: "exams" | "exercises";
|
||||
@@ -37,6 +36,7 @@ export default function ExamPage({ page, user, destination = "/", hideSidebar =
|
||||
const [avoidRepeated, setAvoidRepeated] = useState(false);
|
||||
const [showAbandonPopup, setShowAbandonPopup] = useState(false);
|
||||
const [pendingExercises, setPendingExercises] = useState<string[]>([]);
|
||||
const [shouldPoll, setShouldPoll] = useState(false);
|
||||
|
||||
const {
|
||||
exam, setExam,
|
||||
@@ -60,7 +60,6 @@ export default function ExamPage({ page, user, destination = "/", hideSidebar =
|
||||
setFlags,
|
||||
setShuffles,
|
||||
evaluated,
|
||||
setEvaluated,
|
||||
} = useExamStore();
|
||||
|
||||
const [isFetchingExams, setIsFetchingExams] = useState(false);
|
||||
@@ -150,8 +149,10 @@ export default function ExamPage({ page, user, destination = "/", hideSidebar =
|
||||
useEffect(() => {
|
||||
if (flags.finalizeExam && moduleIndex !== -1) {
|
||||
setModuleIndex(-1);
|
||||
|
||||
|
||||
}
|
||||
}, [flags, moduleIndex, setModuleIndex]);
|
||||
}, [flags.finalizeExam, moduleIndex, setModuleIndex]);
|
||||
|
||||
useEffect(() => {
|
||||
if (flags.finalizeExam && !flags.pendingEvaluation && pendingExercises.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user