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)
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. |
A list of the output from [ottrpal::check_question] with messages/warnings regarding each question and each check.
# 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)#>#> Warning: Colon detected in question on lines: 7 in question starting with:It would be a shame ... in quiz: NA#>#>#>#> Warning: No correct answers provided for What if we don't put ... in quiz: NA#>#> Warning: No incorrect answer options provided for What if only give co ... in quiz: NA