Description Usage Arguments Examples
Add interative multiple choice quiz questions to a tutorial.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
... |
One or more questions or answers |
caption |
Optional quiz caption (defaults to "Quiz") |
text |
Question or option text |
type |
Type of quiz question. Typically this can be automatically determined
based on the provided answers Pass |
correct |
For |
incorrect |
Text to print for an incorrect answer (defaults to "Incorrect.") |
allow_retry |
Allow retry for incorrect answers. |
random_answer_order |
Display answers in a random order. |
message |
Additional message to display along with correct/incorrect feedback. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
question("What number is the letter A in the alphabet?",
answer("8"),
answer("14"),
answer("1", correct = TRUE),
answer("23"),
incorrect = "See [here](https://en.wikipedia.org/wiki/English_alphabet) and try again.",
allow_retry = TRUE
)
question("Where are you right now? (select ALL that apply)",
answer("Planet Earth", correct = TRUE),
answer("Pluto"),
answer("At a computing device", correct = TRUE),
answer("In the Milky Way", correct = TRUE),
incorrect = paste0("Incorrect. You're on Earth, ",
"in the Milky Way, at a computer.")
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.