Also updated the MultipleChoice exercise to the new design
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
import {errorButtonStyle, infoButtonStyle} from "@/constants/buttonStyles";
|
||||
import {FillBlanksExercise} from "@/interfaces/exam";
|
||||
import {Dialog, Transition} from "@headlessui/react";
|
||||
import {mdiArrowLeft, mdiArrowRight} from "@mdi/js";
|
||||
import Icon from "@mdi/react";
|
||||
import clsx from "clsx";
|
||||
import {Fragment, useEffect, useState} from "react";
|
||||
import reactStringReplace from "react-string-replace";
|
||||
@@ -78,8 +74,6 @@ export default function FillBlanks({id, allowRepetition, type, prompt, solutions
|
||||
setBlankSelectedWord(currentBlankId ? userSolutions.find((x) => x.id === currentBlankId)?.solution : undefined);
|
||||
}, [userSolutions, currentBlankId]);
|
||||
|
||||
useEffect(() => console.log({blankSelectedWord}), [blankSelectedWord]);
|
||||
|
||||
const calculateScore = () => {
|
||||
const total = text.match(/({{\d+}})/g)?.length || 0;
|
||||
const correct = userSolutions.filter((x) => solutions.find((y) => x.id === y.id)?.solution === x.solution.toLowerCase() || false).length;
|
||||
@@ -87,10 +81,6 @@ export default function FillBlanks({id, allowRepetition, type, prompt, solutions
|
||||
return {total, correct};
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
console.log(currentBlankId, userSolutions.find((x) => x.id === currentBlankId)?.solution);
|
||||
}, [userSolutions, currentBlankId]);
|
||||
|
||||
const renderLines = (line: string) => {
|
||||
return (
|
||||
<span className="text-base leading-5">
|
||||
|
||||
Reference in New Issue
Block a user