cognitive-engineering-lab / mdbook-quiz

Interactive quizzes for Markdown
http://cel.cs.brown.edu/mdbook-quiz/
Apache License 2.0
106 stars 23 forks source link

Make "See the Correct Answers" Button Optional #36

Open saferust opened 1 year ago

saferust commented 1 year ago

Description:

It would be nice to have a feature that allows users to make the "See the Correct Answers" button optional in the quiz configuration. Currently, this button appears automatically when a user answers some questions incorrectly. However, in certain use cases, we may want to hide this button to encourage learners to attempt the quiz without immediately seeing the correct answers.

Proposed Solution: To implement this feature, a configuration variable must be added to the quiz configuration file. This variable, let's call it show-correct-answers, can be set to true or false. When set to true, the button behaves as it does currently, appearing when a user answers questions incorrectly. When set to false, the button is hidden, and users can only review their answers without seeing the correct ones, while keeping the "retry the quiz" button always visible.

Example Usage:

<!-- Quiz Configuration -->
show-correct-answers`: false
willcrichton commented 10 months ago

I'm not sure this behavior would be desirable if there's a question that has truly stumped a user, especially if it's open-ended (so not easily guessable). Are you expecting that the user would just give up and never see the correct answer?