View source: R/quiz_formatting.R
check_all_questions | R Documentation |
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 |
quiz_specs which is output from [ottrpal::parse_quiz]. |
quiz_name |
The name of the quiz being checked. |
verbose |
Whether progress messages should be given. |
ignore_coursera |
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.
## Not run:
# 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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.