Exam generation rework, batch user tables, fastapi endpoint switch
This commit is contained in:
@@ -5,6 +5,7 @@ import {CommonProps} from ".";
|
||||
import {Fragment} from "react";
|
||||
import Button from "../Low/Button";
|
||||
import useExamStore from "@/stores/examStore";
|
||||
import { typeCheckWordsMC } from "@/utils/type.check";
|
||||
|
||||
export default function FillBlanksSolutions({id, type, prompt, solutions, words, text, onNext, onBack}: FillBlanksExercise & CommonProps) {
|
||||
const storeUserSolutions = useExamStore((state) => state.userSolutions);
|
||||
@@ -44,10 +45,6 @@ export default function FillBlanksSolutions({id, type, prompt, solutions, words,
|
||||
return {total, correct, missing};
|
||||
};
|
||||
|
||||
const typeCheckWordsMC = (words: any[]): words is FillBlanksMCOption[] => {
|
||||
return Array.isArray(words) && words.every((word) => word && typeof word === "object" && "id" in word && "options" in word);
|
||||
};
|
||||
|
||||
const renderLines = (line: string) => {
|
||||
return (
|
||||
<span>
|
||||
|
||||
Reference in New Issue
Block a user