๐ŸŽฏ Answer visibility policy โ€” D005

Standing page: this is the rule in force today. The dated measurements that established it stay in Play and print answers.

Two different questions get asked about answers, and QuizWizz answers them with two separate bits. Can a player see which choice was wrong after finishing? And does a printed PDF carry an answer sheet? A site owner can set a policy for both, and an individual quiz can also carry a setting. D005 decides who wins when the two disagree.

The rule

Whatever the admin decides for the quiz wins, explanations included.

A site-wide Forced answer key sets the default for a quiz. It does not override a quiz whose answer sheet is switched off. Ruled by the operator on 2026-08-19; supersedes D004.

Who decides, per surface

Read this table as: the site key is set to Forced, and the quiz disagrees.

SurfaceDecidesAnchor
PDF answer sheet, quiz-scoped buildthe quiz, via its qw_include_answers metaincludes/Generation/GenerationService.php:340-347
PDF answer sheet, quiz-less build โ€” craft preview, generation defaultsthe site: no quiz id is in scope, so the guard is skipped and Forced still carries the keyincludes/Generation/GenerationService.php:340-341
Answer-sheet control in the quiz editorthe quiz: the checkbox stays editable under Forced and reflects the stored meta, described as Per-quiz setting wins; site Forced only sets the defaultincludes/Admin/views/quiz-editor.php:30-35
Player answer-review payloadboth, and-ed: the site key must be effective and the quizโ€™s own qw_experience.include_answers must be setincludes/Rest/QuizController.php:181
Answer-review control in the quiz editorthe site: disabled( $forced || $key_hidden ), so under Forced the box is checked and lockedincludes/Admin/views/quiz-editor.php:21-28

D005 governs the sheet only. It did not change the player-review path, which is why the two editor controls behave differently on the same screen โ€” that asymmetry is the ruling, not a bug.

A Hidden site key is unaffected. effective_bool( 'key' ) collapses to the matrix default under hidden (includes/ExposureSettings.php:567-568), so a hidden key with def:false yields no sheet whatever the quiz stores, and the sheet checkbox renders unchecked and disabled (includes/Admin/views/quiz-editor.php:21,30-35).

Where the rule lives

One place: pdf_args(), immediately after PresentationDocument::pdf_args(), because that is the only point in a PDF build where a concrete quiz id is in scope.

$args = PresentationDocument::pdf_args( $document );
// D005 (2026-08-19): for a quiz-scoped PDF the per-quiz answer-sheet setting wins,
// even while the site matrix forces `key` on. Mirrors Rest/QuizController.php:176.
$quiz_id = absint( $params['quiz_id'] ?? 0 );
if ( $quiz_id > 0 ) {
    $key_meta = (string) get_post_meta( $quiz_id, 'qw_include_answers', true );
    $sheet    = ExposureSettings::effective_bool( 'key', $settings ) && ( '' === $key_meta || '1' === $key_meta );
    $args['include_answers']      = $sheet;
    $args['answer_key_questions'] = $sheet && ! empty( $args['answer_key_questions'] );
    $args['include_explanations'] = $sheet && ! empty( $args['include_explanations'] );
}

includes/Generation/GenerationService.php:337-347, read from the deployed bench plugin 2026-08-27. clamp_bool_from_matrix() and presentation_schema() are untouched, so settings-save and quiz-less callers keep the older forced behaviour.

The expression mirrors the REST/player sheet_allowed at includes/Rest/QuizController.php:180. The in-source comment at :339 still points at Rest/QuizController.php:176; the mirrored line has since moved to :180, so follow the anchors here rather than the comment.

Falsifier

A quiz whose qw_include_answers is 0 renders an answer key in its PDF while the site key is Forced, or a quiz-less craft PDF loses its forced key.

The harness asserts exactly that: D005 per-quiz answer sheet decides the quiz PDF under a Forced site key while quiz-less PDFs stay forced at scripts/quizwizz-probe.sh:1966, with its fixture and Forced-matrix setup at :1923-1966. It is carried by the standing probe gate 1..94, assertions=94 failures=0. The dated page records the assertion as Wave 6 PHP assertion 15 under the 1..46 run current on 2026-08-19.

Provenance

  • Owner ruling 2026-08-19, superseding D004. It closes UX-ANS-01, the 14th row of the 2026-08-17 owner decision intake, which is not one of the 13 launch blockers. This page is the canonical evidence link for that closure.
  • Dated proof โ€” the 2026-08-19 Forced-policy matrix, the per-quiz PDF measurement, the anonymous-guest browser receipt and the two retractions that preceded the rule: Play and print answers.
  • Bench receipts: ~/dev/qwizz/03 EVIDENCE/2026-08-19-d005-per-quiz-sheet/.
  • Open work tracked in the open-work ledger: the Answers UI split โ€” one collapsed switch writing both bits, with an expand exposing player timing and the sheet separately โ€” is still open. D005 settled precedence, not the control surface.