View source: R/quiz_formatting.R
check_question | R Documentation |
Check quiz question set up to see if it is compliant with Leanpub and Coursera needs. Based off of [Markua guide](https://leanpub.com/markua/read#leanpub-auto-quizzes-and-exercises). Is called by [ottrpal::check_all_questions] and run for each question.
check_question(
question_df,
quiz_name = NA,
verbose = TRUE,
ignore_coursera = TRUE
)
question_df |
Which is an individual question's data frame after being parse from |
quiz_name |
The name of the quiz the question is from |
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 messages/warnings regarding each check for the given question.
## Not run:
# Use readLines to read in a quiz
quiz_path <- good_quiz_path()
quiz_lines <- readLines(quiz_path)
# Use group_split to get the questions
questions_df <- parse_quiz(quiz_lines)$data %>%
dplyr::group_split(question)
good_quiz_checks <- check_question(questions_df[[2]])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.