[Solved] learnR Multiple Choice Questions without correct Answers

I would like to build a survey within a learnR notebook, where all answers are correct. Is it possible to ask multiple choice questions where there is no autograde and all selections are correct but users cannot proceed to the next question without answering the current one?

I found a workaround: Create a multiple choice question but set the type parameters to "single". When the user submits the answer, you can capture the response using the event handler's data$answer. The downside is the user will see that any answer is correct, but really it is is up to you to see the correct parameter to TRUE in the question. You can also edit the incorrect and correct parameters so the user does not think their response is incorrect.

question("Is the sky blue?", type = "single",
         answer("Yes", correct = TRUE),
         answer("No", correct = TRUE),
        answer("Maybe So", correct = TRUE),
         incorrect = "Thank you!",
         correct = "Thank you!",
         allow_retry = TRUE,
         message = "Though your selection is hidden, your response was recorded."

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.