Skip to content

Add quiz config field showQuestionsAfterSubmit - #75722

Draft
fisher-alice wants to merge 18 commits into
stagingfrom
alice/hide-questions-field
Draft

fisher-alice wants to merge 18 commits into
stagingfrom
alice/hide-questions-field

Conversation

@fisher-alice

@fisher-alice fisher-alice commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds the quiz config option `Show questions after submit'. Note that I changed from hide -> show to match the wording used for 'Show correctness'. Also, I moved the field directly under 'Show correctness' since both have to be turned on for 'Reveal answer and explanation' to be possible:

Screenshot 2026-10-02 at 12 41 35 PM Screenshot 2026-10-02 at 12 41 08 PM

@moshebaricdo lmk what you think. Thanks!

Links

Testing story

Added unit tests and tested locally.

Screencast of new field and toggle in build mode:

Screen.Recording.2026-10-02.at.12.37.37.PM.mov

Screenshot of quiz when show_correctness is true but show_questions_after_submit is false.

Screenshot 2026-10-02 at 12 38 33 PM

Deployment notes

Privacy and security

allowMultipleAttempts: true,
showCorrectness: true,
revealAnswerExplanation: true,
hideQuestionsAfterSubmit: false,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new builder test clicks an initially enabled toggle but incorrectly expects the submitted value to remain enabled.

Review effort: Balanced
Findings: 1 High severity · 1 Low severity

Open (2)
What changed in this PR

Adds a quiz setting that hides per-question results after submission while retaining the score display.

Changes:

  • Persists and exposes hideQuestionsAfterSubmit.
  • Adds levelbuilder configuration and purpose defaults.
  • Hides submitted question cards and adds coverage.
File Description
dashboard/​app/​models/​levels/​quiz.rb Persists the setting.
dashboard/​app/​controllers/​quizzes_controller.rb Reads and updates the setting.
dashboard/​test/​controllers/​quizzes_controller_test.rb Tests controller handling.
apps/​src/​quiz/​types.ts Adds the level property type.
apps/​src/​quiz/​builder/​useQuizBuilderView.tsx Initializes builder state.
apps/​src/​quiz/​builder/​QuizConfigurationPanel.tsx Adds defaults and toggle UI.
apps/​src/​quiz/​attempt/​useQuizAttemptView.tsx Passes the setting to the workspace.
apps/​src/​quiz/​attempt/​QuizAttemptWorkspace.tsx Suppresses submitted question results.
apps/​test/​unit/​quiz/​builder/​QuizConfigurationPanelTest.tsx Tests configuration behavior.
apps/​test/​unit/​quiz/​attempt/​QuizAttemptWorkspaceTest.tsx Tests hidden results.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread apps/test/unit/quiz/builder/QuizConfigurationPanelTest.tsx
Comment thread apps/src/quiz/builder/QuizConfigurationPanel.tsx Outdated
@fisher-alice fisher-alice changed the title Add quiz config field hideQuestionsAfterSubmit Add quiz config field showQuestionsAfterSubmit Oct 2, 2026
@moshebaricdo

Copy link
Copy Markdown
Contributor

This PR adds the quiz config option `Show questions after submit'. Note that I changed from hide -> show to match the wording used for 'Show correctness'. Also, I moved the field directly under 'Show correctness' since both have to be turned on for 'Reveal answer and explanation' to be possible:

Screenshot 2026-10-02 at 12 41 35 PM Screenshot 2026-10-02 at 12 41 08 PM
@moshebaricdo lmk what you think. Thanks!

Links

Testing story

Added unit tests and tested locally.

Screencast of new field and toggle in build mode:

Screen.Recording.2026-10-02.at.12.37.37.PM.mov
Screenshot of quiz when show_correctness is true but show_questions_after_submit is false.

Screenshot 2026-10-02 at 12 38 33 PM ## Deployment notes ## Privacy and security

Thanks for adding these options! From a UI standpoint, I'd like to make a few tweaks around how how we divide controls within a card and how we tie the conditional to the field that triggers it. I'll update mocks to include the new option!

@moshebaricdo

Copy link
Copy Markdown
Contributor

This PR adds the quiz config option `Show questions after submit'. Note that I changed from hide -> show to match the wording used for 'Show correctness'. Also, I moved the field directly under 'Show correctness' since both have to be turned on for 'Reveal answer and explanation' to be possible:
Screenshot 2026-10-02 at 12 41 35 PM Screenshot 2026-10-02 at 12 41 08 PM
@moshebaricdo lmk what you think. Thanks!

Links

Testing story

Added unit tests and tested locally.
Screencast of new field and toggle in build mode:
Screen.Recording.2026-10-02.at.12.37.37.PM.mov
Screenshot of quiz when show_correctness is true but show_questions_after_submit is false.
Screenshot 2026-10-02 at 12 38 33 PM

Deployment notes

Privacy and security

Thanks for adding these options! From a UI standpoint, I'd like to make a few tweaks around how how we divide controls within a card and how we tie the conditional to the field that triggers it. I'll update mocks to include the new option!

Mocks have been updated!
Screenshot 2026-10-02 at 2 06 01 PM

Base automatically changed from alice/question-results-after-submit to staging October 3, 2026 03:42

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants