powered by
Creates a radio button tutorial quiz question. The student can select only one radio button before submitting their answer.
question_radio( text, ..., correct = "Correct!", incorrect = "Incorrect", try_again = incorrect, allow_retry = FALSE, random_answer_order = FALSE )
Question or option text
answers and extra parameters passed onto question.
question
For question, text to print for a correct answer (defaults to "Correct!"). For answer, a boolean indicating whether this answer is correct.
answer
Text to print for an incorrect answer (defaults to "Incorrect") when allow_retry is FALSE.
allow_retry
FALSE
Text to print for an incorrect answer (defaults to "Incorrect") when allow_retry is TRUE.
TRUE
Allow retry for incorrect answers. Defaults to FALSE.
Display answers in a random order.
Note: Multiple correct answers are allowed.
question_checkbox, question_text
question_checkbox
question_text
# NOT RUN { question_radio( "Pick the letter B", answer("A"), answer("B", correct = TRUE), answer("C"), answer("D"), allow_retry = TRUE, random_answer_order = TRUE ) # }
Run the code above in your browser using DataLab