LearnR-style question
question(
text,
...,
type = c("auto", "single", "multiple", "learnr_radio", "learnr_checkbox",
"learnr_text"),
correct = "Correct!",
incorrect = "Incorrect",
try_again = incorrect,
message = NULL,
post_message = NULL,
loading = c("**Loading:** ", text, "<br/><br/><br/>"),
submit_button = "Submit Answer",
try_again_button = "Try Again",
allow_retry = FALSE,
random_answer_order = FALSE,
options = list()
)
The question text
Answers (see webexercises::answer)
The input type (only single for now)
(not used yet)
(not used yet)
(not used yet)
(not used yet)
(not used yet)
(not used yet)
(not used yet)
(not used yet)
(not used yet)
Whether to randomise the order of the answers
(not used yet)
html for the webexercises question
question("Is R fun?",
answer("Yes", TRUE),
answer("No"),
random_answer_order = TRUE)
#> [1] "<div class='webex-question'><span class='webex-question-text'>Is R fun?</span><select class='webex-select'><option value='blank'></option><option value='x'>No</option><option value='answer'>Yes</option></select></div>"