q <- create_question(
prompt = 'My prompt explaining what the ATE of this thing should be',
add_choice("34"),
add_choice("59", TRUE),
add_choice("98", TRUE)
)
q2 <- create_question(
prompt = 'My prompt explaining what the ATC of this thing should be',
add_slider(0, 30, 15, correct = 10)
)
quiz <- create_quiz(q, q2)
q3 <- create_question_raw(
prompt = htmltools::div(
htmltools::p("my question"),
shiny::selectInput(
inputId = shiny::NS('quiz')('answers'),
label = 'Select 5',
choices = c(4, 5, 6)
)
),
grader = \(user_input) user_input == '5',
correct_answer_pretty = '5'
)
quiz2 <- create_quiz(q3, q2)
Run the code above in your browser using DataLab