parse_quiz: Parse Quiz and Other Checking Functions

Description Usage Arguments Value Examples

View source: R/quiz.R

Description

Parse Quiz and Other Checking Functions

Check Quiz Information

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

Arguments

x

The output from [leanbuild::parse_quiz]

verbose

print diagnostic messages

Value

A list of elements, including a 'data.frame' and metadata for questions

A logical

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
x = c('{quiz, id: quiz_00_filename}',
"### Lesson Name quiz",
"{choose-answers: 4}",
"? What do you think?",
"",
"C) The answer to this one",
"o) Not the answer",
"o) Not the answer either",
"C) Another correct answer",
"m) Mandatory different answer",
"",
"{/quiz}")
out = parse_quiz(x)
check_quiz_attributes(out)

x = c('{quiz, id: quiz_00_filename, choose-answers: 4}',
"### Lesson Name quiz",
"{choose-answers: 4, attempts: 25}",
"? What do you think?",
"C) The answer to this one",
"o) Not the answer",
"o) Not the answer either",
"C) Another correct answer",
"m) Mandatory different answer",
"{/quiz}")
out = parse_quiz(x)
check_quiz_attributes(out)
check_quiz_question_attributes(out)

x = c('{quiz, id: quiz_00_filename, choose-answers: 4}',
"### Lesson Name quiz",
"{choose-answers: 4, attempts: 25}",
"",
"? What do you think?",
"! The answer to this one",
"{/quiz}")
out = parse_quiz(x)
check_quiz_attributes(out)
check_quiz_question_attributes(out)

muschellij2/leanbuild documentation built on Dec. 21, 2021, 11:03 p.m.