View source: R/question_radio.R
question_radio | R Documentation |
Creates a radio button tutorial quiz question. The student can select only one radio button before submitting their answer. Note: Multiple correct answers are allowed.
question_radio(
text,
...,
correct = "Correct!",
incorrect = "Incorrect",
try_again = incorrect,
allow_retry = FALSE,
random_answer_order = FALSE
)
text |
Question or option text |
... |
Answers created with |
correct |
For |
incorrect |
Text to print for an incorrect answer (defaults to
"Incorrect") when |
try_again |
Text to print for an incorrect answer (defaults to
"Incorrect") when |
allow_retry |
Allow retry for incorrect answers. Defaults to |
random_answer_order |
Display answers in a random order. |
Returns a learnr question of type "learnr_radio"
.
Other Interactive Questions:
question_checkbox()
,
question_numeric()
,
question_text()
,
quiz()
question_radio(
"Pick the letter B",
answer("A"),
answer("B", correct = TRUE),
answer("C"),
answer("D"),
allow_retry = TRUE,
random_answer_order = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.