Skip to content

Reveal quiz answers separately from the results - #269

Open
junkerderprovinz wants to merge 2 commits into
ClaperCo:devfrom
junkerderprovinz:feature/quiz-reveal-answer
Open

junkerderprovinz wants to merge 2 commits into
ClaperCo:devfrom
junkerderprovinz:feature/quiz-reveal-answer

Conversation

@junkerderprovinz

Copy link
Copy Markdown
Contributor

Closes #250, following the split you described there.

show_results keeps its name and now only means "results on the projector": the overlay and the percentage and count per option, on neutral grey bars. A new reveal_answers flag with its own toggle (shortcut X, below the results toggle) colours the correct option green on the projector and turns on the green and red feedback and the score on attendee phones. Previous, Next and Review questions work whenever either flag is on, so the distribution can be walked through question by question without giving the answer away.

Results Answers Projector Attendee after submitting
off off hidden waiting for results
on off percentages on grey bars percentages, own pick highlighted, no score
off on correct option green, no percentages score, green and red
on on as today as today

Revealing without the results still puts the quiz on the projector, so pressing X always changes something the room can see. It also covers showing the answer without the vote counts.

The migration adds reveal_answers and sets it to true wherever show_results is true, so a quiz that shows its results today keeps showing the answer after the upgrade. New quizzes start with both on, which matches the current behaviour.

Presenter

Walking through the questions with the distribution up surfaced two existing problems, so this also moves the question index into the presenter LiveView:

  • The presenter started at index 0 while ManageableQuizComponent started on the summary at -1, so Next from the summary skipped the first question.
  • :quiz_updated from the manage view carries a quiz without percentages, so every toggle blanked the numbers on the projector. The presenter runs Quizzes.set_percentages/1 on it.

The projector falls back to the summary when a different quiz becomes current or is updated, and when the question on screen is removed. Without that, editing or moving another quiz during a walkthrough would have crashed the presenter.

For you to decide

  • Reveal applies to the whole quiz. After X, Next opens the following question already revealed. Revealing per question would need extra state, so I left it out.
  • New quizzes default to reveal on, like today. Defaulting it to off would make the new flow the default; happy to flip it.
  • Until the answers are revealed, the projector summary shows "Total submissions" instead of the average score, since the average gives the answers away. Easy to drop if you'd rather keep the score.
  • Any :quiz_updated still replaces the quiz on the projector, including one for a quiz on another slide. That is unchanged here; limiting it to the current quiz would be a separate fix.

The two new strings are translated in every locale. The rest of the catalogue diff is #: references refreshed by mix gettext.extract.

383 tests pass apart from the three existing ones that need ImageMagick and Unix paths and fail on my Windows machine. I also went through it in the browser with the manage page, the presenter and two attendees.

@alxlion alxlion added the enhancement New feature or request label Oct 13, 2026
@junkerderprovinz
junkerderprovinz force-pushed the feature/quiz-reveal-answer branch from b0db68d to ca2d4db Compare October 15, 2026 10:51
@junkerderprovinz
junkerderprovinz force-pushed the feature/quiz-reveal-answer branch from ca2d4db to 69c8216 Compare October 28, 2026 22:55
junkerderprovinz added 2 commits November 18, 2026 16:50
Showing results put the quiz on the projector, showed the distribution
and coloured the correct option in one step, so the distribution could
not be shown without giving the answer away. A second toggle (X)
reveals the answers; the green and red feedback and the scores follow
it on the projector and on attendee phones. Quizzes that show their
results are migrated to reveal their answers too.

The presenter now keeps the question index itself. Next from the quiz
summary starts at the first question, the projector keeps its
percentages when a toggle changes, and it falls back to the summary
when another quiz takes over or the question on screen is removed.
@junkerderprovinz
junkerderprovinz force-pushed the feature/quiz-reveal-answer branch from 69c8216 to a5bc60d Compare November 18, 2026 19:20

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

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Poll - Highlight correct and incorrect answers

2 participants