Takes output from [ottrpal::parse_quiz] and runs checks on each question in a quiz by calling [ottrpal::check_question] for each question. First splits questions into their own data frame. Returns a list of messages/warnings about each question's set up.
check_all_questions(
quiz_specs,
quiz_name = NA,
verbose = TRUE,
ignore_coursera = TRUE
)
quiz_specs which is output from [ottrpal::parse_quiz].
The name of the quiz being checked.
Whether progress messages should be given.
Coursera doesn't like `!` or `:` in the quizzes. Do not convert quizzes to coursera and ignore ! and : in question prompts that would not be allowed in Leanpub quizzes when converted to a Coursera quiz. Default is to ignore Coursera compatibility.
A list of the output from [ottrpal::check_question] with messages/warnings regarding each question and each check.
if (FALSE) {
# Using good quiz md example
quiz_path <- good_quiz_path()
good_quiz <- readLines(quiz_path)
good_quiz_specs <- parse_quiz(good_quiz)
good_quiz_checks <- check_all_questions(good_quiz_specs)
# Using bad quiz md example
bad_quiz <- readLines(bad_quiz_path())
bad_quiz_specs <- parse_quiz(bad_quiz)
bad_quiz_checks <- check_all_questions(bad_quiz_specs)
}