R/question_bucket.R
question_bucket.Rd
bucket problem question for learnr tutorials (experimental).
question_bucket(initial, ..., text = c("Drag from here", "Construct your solution here"), orientation = c("horizontal", "vertical"), correct = "Correct!", incorrect = "Incorrect", try_again = incorrect, message = NULL, post_message = NULL, loading = c("Loading: "), submit_button = "Give feedback", try_again_button = "Try Again", allow_retry = TRUE, random_answer_order = TRUE, options = sortable_options())
initial | Initial value of answer options. This must be a character vector. |
---|---|
... | One or more answers. Passed to |
text | Question or option text |
orientation | Either |
correct | Text to print for a correct answer (defaults to "Correct!") |
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 |
message | Additional message to display along with correct/incorrect feedback. This message is always displayed after a question submission. |
post_message | Additional message to display along with correct/incorrect feedback.
If |
loading | Loading text to display as a placeholder while the question is loaded |
submit_button | Label for the submit button. Defaults to |
try_again_button | Label for the try again button. Defaults to |
allow_retry | Allow retry for incorrect answers. Defaults to |
random_answer_order | Display answers in a random order. |
options | Extra options to be stored in the question object. |
## Example of bucket problem inside a learn tutorial if (interactive()) { learnr::run_tutorial("bucket", package = "parsons") }