Expand description
The schema for questions used in mdbook-quiz. Intended to be deserialized from a TOML file.
See Quiz as the top-level type. Here is an example of a quiz:
[[questions]]
id = "b230bed3-d6ba-4048-8b06-aa655d837b04"
type = "MultipleChoice"
prompt.prompt = "What is 1 + 1?"
prompt.distractors = ["1", "3", "**infinity**"]
answer.answer = ["2"]
context = """
Consult your local mathematician for details.
""""Note that all Rust identifiers with multiple words (e.g. does_compile) use camelCase keys,
so should be written as doesCompile in the TOML.
Structs§
- Markdown
- A Markdown string.
- Multiple
Choice - A question where users select among several possible answers.
- Multiple
Choice Answer - An answer for a
MultipleChoicequestion. - Multiple
Choice Prompt - A prompt for a
MultipleChoicequestion. - Question
Fields - Fields common to all question types.
- Quiz
- A quiz is the top-level data structure in mdbook-quiz. It represents a sequence of questions.
- Short
Answer - A question where users type in a response.
- Short
Answer Answer - An answer for a
ShortAnswerquestion. - Short
Answer Prompt - A prompt for a
ShortAnswerquestion. - Tracing
- A question where users guess the output of a program.
- Tracing
Answer - An answer for a
Tracingquestion. - Tracing
Prompt - A prompt for a
Tracingquestion.
Enums§
- Multiple
Choice Answer Format - The type of response for a
MultipleChoicequestion. - Question
- An individual question. One of several fixed types.
- Short
Answer Response Format - The kind of response format (and subsequent input method) that accompanies a given short answer questions.