question_pool: Create a question with answers randomly taken from the pool...

View source: R/question_pool.R

question_poolR Documentation

Create a question with answers randomly taken from the pool of answers.

Description

Create a question with answers randomly taken from the pool of answers.

Usage

question_pool(
  title,
  ...,
  nr_answers = 5,
  random_answer_order = TRUE,
  container_class = NULL,
  mc = FALSE,
  post_rendered = NULL,
  title_container = h5,
  correct_label = 12,
  show_only_with_section = TRUE
)

Arguments

title

question title.

...

answer options.

nr_answers

maximum number of answers to display. At least one correct answer will always be shown.

random_answer_order

should the order of answers be randomized?

container_class

additional HTML classes to add to the container.

mc

show as multiple choice.

post_rendered

optional function to post-process rendered text (e.g., to replace placeholders). The function is called with a single string marked as HTML and evaluated in the server context.

correct_label

if not NULL, change the answer option labels to hex numbers with the right-most digit being equal to the given number (by default 0xa). The length of the hex number is determined by the number of answer options.

show_only_with_section

render the output only if the section is visible.


dakep/stat305templates documentation built on Nov. 27, 2022, 8:23 a.m.