Skip to content

Quiz: optional reset when the participant leaves the quiz window #1731

Closed

Description

@rpgmem

Problem

An operator running a quiz has no way to discourage looking answers up in another tab.

Design

  • Quiz setting "Reset the quiz when the participant leaves the window" (off by default).
  • When on, a notice above the form says so before the participant starts.
  • Trigger: visibilitychange to hidden (tab switch, minimise), not blur — a system notification, a screen reader or a click inside an embedded video fires blur without the person leaving.
  • On return: the answers are cleared and an overlay explains why and offers to reload.
  • It is a deterrent, not a security boundary (another device, JS disabled), and the documentation says so.
  • Leaving does not count as an attempt. The number of exits is recorded on the submission (_quiz_focus_losses) and shown to the operator.

Acceptance criteria

  • Setting, notice, overlay (accessible alertdialog), dark mode.
  • Exit count stored and shown on the submission screen.
  • Documentation, three catalogues, CHANGELOG, Vitest + PHPUnit tests.

Activity

  1. rpgmem commented on Oct 13, 2026

    @rpgmem
    OwnerAuthor

    Delivered in #1743 (squash 34ca86f6 on develop).


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions