From 6eb4e714bfca9f6f1cd07c56a13e40021cdf2954 Mon Sep 17 00:00:00 2001 From: willcrichton Date: Thu, 12 Sep 2024 00:53:09 +0000 Subject: [PATCH] deploy: bb2b1bd0fbeef0a4f6dfe1990c921964e38557f6 --- quiz/quiz-embed.iife.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quiz/quiz-embed.iife.js b/quiz/quiz-embed.iife.js index 7449802..61d26e4 100644 --- a/quiz/quiz-embed.iife.js +++ b/quiz/quiz-embed.iife.js @@ -50479,7 +50479,7 @@ ${question.context}` }) React.createElement("div", { style: { display: expanded ? "block" : "none" } }, "We want to know how much you are learning that can be recalled without assistance. Please complete the quiz without re-reading the text, e.g. by opening it in another tab.") ); }; - let loadState = ({ quiz, answerStorage, cacheAnswers }) => { + let loadState = ({ quiz, answerStorage, cacheAnswers, autoStart }) => { let stored = answerStorage.load(); let badSchema = stored && stored.attempt > 0 && !stored.confirmedDone && !stored.wrongAnswers; if (cacheAnswers && stored && !badSchema) { @@ -50494,7 +50494,7 @@ ${question.context}` }) }; } else { return { - started: false, + started: autoStart || false, index: 0, attempt: 0, confirmedDone: false, @@ -50629,7 +50629,8 @@ ${question.context}` }) let state = useLocalObservable(() => loadState({ quiz: config.quiz, answerStorage, - cacheAnswers: config.cacheAnswers + cacheAnswers: config.cacheAnswers, + autoStart: config.autoStart })); let saveToCache = () => { if (config.cacheAnswers)