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())

Arguments

initial

Initial value of answer options. This must be a character vector.

...

One or more answers. Passed to learnr::question().

text

Question or option text

orientation

Either horizontal or vertical, and specifies the layout of the components on the page.

correct

Text to print for a correct answer (defaults to "Correct!")

incorrect

Text to print for an incorrect answer (defaults to "Incorrect") when allow_retry is FALSE.

try_again

Text to print for an incorrect answer (defaults to "Incorrect") when allow_retry is TRUE.

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 allow_retry is TRUE, this message will only be displayed after the correct submission. If allow_retry is FALSE, it will produce a second message alongside the message message value.

loading

Loading text to display as a placeholder while the question is loaded

submit_button

Label for the submit button. Defaults to "Submit Answer"

try_again_button

Label for the try again button. Defaults to "Submit Answer"

allow_retry

Allow retry for incorrect answers. Defaults to FALSE.

random_answer_order

Display answers in a random order.

options

Extra options to be stored in the question object.

Examples

## Example of bucket problem inside a learn tutorial if (interactive()) { learnr::run_tutorial("bucket", package = "parsons") }