DeepTutor icon indicating copy to clipboard operation
DeepTutor copied to clipboard

fix(reading): avoid disclosing quiz answer keys before submission

Open evan188199-tech opened this issue 3 weeks ago • 1 comments

Problem

On current main / v1.7.2 (60fb3bdf), the initial Reading quiz action response includes correct_choice_index before the learner submits an answer. run_extension_action persists the complete pending questions and then returns the same payload. The UI uses server grading, but also requires the answer index to render clickable choices.

Reproduction and expected behavior

Generate a Reading quiz using synthetic material and inspect the initial action JSON: each answerable question includes its answer key. The browser should receive display fields and answerability only; the answer key should stay in server-side pending storage. Simply removing the backend field currently makes the frontend render static choices.

Proposed paired fix

Keep the complete pending questions on the server, project outgoing questions to id, prompt, choices, and server-computed can_answer, and update the shared Reading UI to use that boolean. Preserve keyless static extension questions, server scoring, retries, and rewards. Ignore plugin-supplied answerability flags.

A tested local patch is ready as a draft PR. Would this additive public response contract be the preferred upstream approach, or should public quiz questions have a separate schema? This concerns answer disclosure and assessment integrity, not a claim of cross-account access. No real learner data or deployment was used.

evan188199-tech avatar Nov 09 '26 14:11 evan188199-tech

Verified fixed on the current local dev branch (fa3debf4b4cb), with regression checks.

will be fixed in the next releases!

pancacake avatar Nov 14 '26 16:11 pancacake