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)

Arguments

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.

Value

A list of the output from [ottrpal::check_question] with messages/warnings regarding each question and each check.

Examples

# 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)
#> Checking question: First question to as ... in quiz: NA
#> Checking question: Example without choo ... in quiz: NA
#> Checking question: Question example wit ... in quiz: NA
#> Checking question: A more complicated e ... in quiz: NA
# 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)
#> Checking question: It would be a shame ... in quiz: NA
#> Warning: Colon detected in question on lines: 7 in question starting with:It would be a shame ... in quiz: NA
#> Checking question: What a shame if we p ... in quiz: NA
#> Checking question: Shame shame if we sa ... in quiz: NA
#> Checking question: What if we don't put ... in quiz: NA
#> Warning: No correct answers provided for What if we don't put ... in quiz: NA
#> Checking question: What if only give co ... in quiz: NA
#> Warning: No incorrect answer options provided for What if only give co ... in quiz: NA