Updated the Finish screen along with other tweaks
This commit is contained in:
@@ -59,8 +59,9 @@ export default function MultipleChoice({id, prompt, type, questions, userSolutio
|
||||
const calculateScore = () => {
|
||||
const total = questions.length;
|
||||
const correct = answers.filter((x) => questions.find((y) => y.id === x.question)?.solution === x.option || false).length;
|
||||
const missing = total - answers.filter((x) => questions.find((y) => y.id === x.question)).length;
|
||||
|
||||
return {total, correct};
|
||||
return {total, correct, missing};
|
||||
};
|
||||
|
||||
const next = () => {
|
||||
|
||||
Reference in New Issue
Block a user