diff --git a/src/components/Diagnostic.tsx b/src/components/Diagnostic.tsx index a221f1d2..f7b448f4 100644 --- a/src/components/Diagnostic.tsx +++ b/src/components/Diagnostic.tsx @@ -36,7 +36,7 @@ export default function Diagnostic({onFinish}: Props) { }; const selectExam = () => { - const examPromises = MODULE_ARRAY.map((module) => getExam(module, true)); + const examPromises = MODULE_ARRAY.map((module) => getExam(module, true, "partial")); Promise.all(examPromises).then((exams) => { if (exams.every((x) => !!x)) { diff --git a/src/exams/Selection.tsx b/src/exams/Selection.tsx index 2485bb70..02dcb681 100644 --- a/src/exams/Selection.tsx +++ b/src/exams/Selection.tsx @@ -12,17 +12,19 @@ import {calculateAverageLevel} from "@/utils/score"; import {sortByModuleName} from "@/utils/moduleUtils"; import {capitalize} from "lodash"; import ProfileSummary from "@/components/ProfileSummary"; +import {Variant} from "@/interfaces/exam"; interface Props { user: User; page: "exercises" | "exams"; - onStart: (modules: Module[], avoidRepeated: boolean) => void; + onStart: (modules: Module[], avoidRepeated: boolean, variant: Variant) => void; disableSelection?: boolean; } export default function Selection({user, page, onStart, disableSelection = false}: Props) { const [selectedModules, setSelectedModules] = useState([]); const [avoidRepeatedExams, setAvoidRepeatedExams] = useState(true); + const [variant, setVariant] = useState("full"); const {stats} = useStats(user?.id); const toggleModule = (module: Module) => { @@ -202,20 +204,37 @@ export default function Selection({user, page, onStart, disableSelection = false )}
-
setAvoidRepeatedExams((prev) => !prev)}> - +
- + className="flex gap-3 items-center text-mti-gray-dim text-sm cursor-pointer w-full -md:justify-center" + onClick={() => setAvoidRepeatedExams((prev) => !prev)}> + +
+ +
+ + Avoid Repeated Questions + +
+
setVariant((prev) => (prev === "full" ? "partial" : "full"))}> + +
+ +
+ Full length exams
- Avoid Repeated Questions