Listening preview and some more patches
This commit is contained in:
@@ -107,7 +107,7 @@ export default function Reading({ exam, showSolutions = false, preview = false,
|
||||
const [multipleChoicesDone, setMultipleChoicesDone] = useState<{ id: string; amount: number }[]>([]);
|
||||
const [isTextMinimized, setIsTextMinimzed] = useState(false);
|
||||
const [exerciseType, setExerciseType] = useState("");
|
||||
|
||||
|
||||
const [seenParts, setSeenParts] = useState<Set<number>>(new Set(showSolutions ? exam.parts.map((_, index) => index) : []));
|
||||
const [showPartDivider, setShowPartDivider] = useState<boolean>(typeof exam.parts[0].intro === "string" && exam.parts[0].intro !== "");
|
||||
|
||||
@@ -304,15 +304,17 @@ export default function Reading({ exam, showSolutions = false, preview = false,
|
||||
|
||||
return (
|
||||
<>
|
||||
{(showPartDivider) ?
|
||||
<PartDivider
|
||||
module="reading"
|
||||
sectionLabel="Part"
|
||||
defaultTitle="Reading exam"
|
||||
section={exam.parts[partIndex]}
|
||||
sectionIndex={partIndex}
|
||||
onNext={() => { setShowPartDivider(false); setBgColor("bg-white"); setSeenParts((prev) => new Set(prev).add(exerciseIndex)) }}
|
||||
/> : (
|
||||
{showPartDivider ?
|
||||
<div className="flex justify-center items-center h-full">
|
||||
<PartDivider
|
||||
module="reading"
|
||||
sectionLabel="Part"
|
||||
defaultTitle="Reading exam"
|
||||
section={exam.parts[partIndex]}
|
||||
sectionIndex={partIndex}
|
||||
onNext={() => { setShowPartDivider(false); setBgColor("bg-white"); setSeenParts((prev) => new Set(prev).add(exerciseIndex)) }}
|
||||
/>
|
||||
</div> : (
|
||||
<>
|
||||
<div className="flex flex-col h-full w-full gap-8">
|
||||
<BlankQuestionsModal isOpen={showBlankModal} onClose={confirmFinishModule} />
|
||||
|
||||
Reference in New Issue
Block a user