Add interactive exam questions to a tutorial. The exam()
function is copied from learnr::quiz
and provides the same functionality with additional features.
An optional shuffle argument allows for the questions to be displayed in a random order.
If a question()
contains the argument options(list(multi_part = "name")
, where "name" is any
string identifier that groups multiple questions together, then the questions of the same "name" will be
displayed next to each other when shuffled.
If a question()
contains the argument options(list(group = "name")
where "name" is any
string identifier that groups multiple questions together, then 1 question will be randomly selected from
the group set of type "name" allowing for varying exams/tutorials.
Usage
exam(..., caption = rlang::missing_arg(), shuffle = FALSE)