import { FillBlanksExercise, TrueFalseExercise } from "@/interfaces/exam"; import clsx from "clsx"; import reactStringReplace from "react-string-replace"; import { CommonProps } from "."; import { Fragment } from "react"; import Button from "../Low/Button"; type Solution = "true" | "false" | "not_given"; export default function TrueFalseSolution({ prompt, type, id, questions, userSolutions, headerButtons, footerButtons }: TrueFalseExercise & CommonProps) { const getButtonColor = (buttonSolution: Solution, solution: Solution, userSolution: Solution | undefined) => { if (buttonSolution !== userSolution && buttonSolution !== solution) return "purple"; if (userSolution) { if (userSolution === buttonSolution && solution === buttonSolution) { return "purple"; } if (solution === buttonSolution) { return "purple"; } return "rose"; } return "gray"; }; return (
For each of the questions below, select