|
|
---
|
|
|
author: Armin Bernstetter
|
|
|
date: "21.04.2020"
|
|
|
---
|
|
|
[[_TOC_]]
|
|
|
|
|
|
# Quiz Syntax
|
|
|
## Quizzes
|
|
|
|
|
|
## Class definition
|
|
|
### Class definition
|
|
|
|
|
|
For each question type you can use either of the three tags to create quizzes
|
|
|
For each question type you can use either of the three tags to create
|
|
|
quizzes
|
|
|
|
|
|
```
|
|
|
.quiz-match-items, .quiz-mi, .qmi
|
|
|
.quiz-match-items, .quiz-mi, .qmi
|
|
|
|
|
|
.quiz-multiple-choice, .quiz-mc, .qmc
|
|
|
.quiz-multiple-choice, .quiz-mc, .qmc
|
|
|
|
|
|
.quiz-insert-choices, .quiz-ic, .qic
|
|
|
.quiz-insert-choices, .quiz-ic, .qic
|
|
|
|
|
|
.quiz-free-text, .quiz-ft, .qft
|
|
|
```
|
|
|
.quiz-free-text, .quiz-ft, .qft
|
|
|
|
|
|
## Basic syntax
|
|
|
### Basic syntax
|
|
|
|
|
|
The quiz syntax is based on the markdown task list syntax. A markdown task list looks like this
|
|
|
The quiz syntax is based on the markdown task list syntax. A markdown
|
|
|
task list looks like this
|
|
|
|
|
|
```
|
|
|
- [ ] This box is not checked
|
|
|
- [X] This box is checked
|
|
|
- [ ] Another unchecked box
|
|
|
```
|
|
|
- [ ] This box is not checked
|
|
|
- [X] This box is checked
|
|
|
- [ ] Another unchecked box
|
|
|
|
|
|
Questions are defined by level 2 headers. That means creating a question **needs**
|
|
|
Questions are defined by level 2 headers. That means creating a question
|
|
|
**needs**
|
|
|
|
|
|
```
|
|
|
## Question title {.qmc}
|
|
|
```
|
|
|
## Question title {.qmc}
|
|
|
|
|
|
(where `.qmc` can be replaced by any of the other quiz classes)
|
|
|
|
|
|
You can add tooltips by creating a nested list e.g.
|
|
|
|
|
|
```
|
|
|
- [ ] A
|
|
|
- tooltip A
|
|
|
- [X] B
|
|
|
- tooltip B
|
|
|
```
|
|
|
- [ ] A
|
|
|
- tooltip A
|
|
|
- [X] B
|
|
|
- tooltip B
|
|
|
|
|
|
### Fenced Divs Syntax
|
|
|
|
|
|
# Matching Questions
|
|
|
Alternatively, quizzes can be defined using the **fenced divs** syntax:
|
|
|
|
|
|
These questions generate quizzes where a user can drag and drop items to sort them into "buckets".
|
|
|
::: qmc
|
|
|
- [ ] A
|
|
|
- tooltip A
|
|
|
- [X] B
|
|
|
- tooltip B
|
|
|
:::
|
|
|
|
|
|
This uses the Pandoc [definition list syntax](https://pandoc.org/MANUAL.html#definition-lists).
|
|
|
## Matching Questions
|
|
|
|
|
|
You can provide distractor items (items not belonging to any bucket) or empty buckets (no item belonging in those empty buckets) by using the exclamation mark "!".
|
|
|
These questions generate quizzes where a user can drag and drop items to
|
|
|
sort them into "buckets".
|
|
|
|
|
|
```
|
|
|
## Matching Question {.qmi}
|
|
|
This uses the Pandoc [definition list
|
|
|
syntax](https://pandoc.org/MANUAL.html#definition-lists).
|
|
|
|
|
|
Question text
|
|
|
You can provide distractor items (items not belonging to any bucket) or
|
|
|
empty buckets (no item belonging in those empty buckets) by using the
|
|
|
exclamation mark "!".
|
|
|
|
|
|
BucketA
|
|
|
: A1
|
|
|
: A2
|
|
|
## Matching Question {.qmi}
|
|
|
|
|
|
BucketB
|
|
|
: B1
|
|
|
Question text
|
|
|
|
|
|
!
|
|
|
: Distractor
|
|
|
BucketA
|
|
|
: A1
|
|
|
: A2
|
|
|
|
|
|
Empty Bucket
|
|
|
: !
|
|
|
```
|
|
|
BucketB
|
|
|
: B1
|
|
|
|
|
|
!
|
|
|
: Distractor
|
|
|
|
|
|
Empty Bucket
|
|
|
: !
|
|
|
|
|
|
# Multiple Choice Questions
|
|
|
## Multiple Choice Questions
|
|
|
|
|
|
Classic multiple choice questions
|
|
|
|
|
|
```
|
|
|
## Multiple Choice Question {.qmc}
|
|
|
## Multiple Choice Question {.qmc}
|
|
|
|
|
|
Question text
|
|
|
Question text
|
|
|
|
|
|
- [ ] A
|
|
|
- nope
|
|
|
- [X] B
|
|
|
- yes
|
|
|
```
|
|
|
- [ ] A
|
|
|
- nope
|
|
|
- [X] B
|
|
|
- yes
|
|
|
|
|
|
# InsertChoices Questions
|
|
|
## InsertChoices Questions
|
|
|
|
|
|
This will create a sort of blank text questions.
|
|
|
If multiple items are provided in the task list, they will be rendered as a drop down menu where the user can click answers.
|
|
|
This will create a sort of blank text questions. If multiple items are
|
|
|
provided in the task list, they will be rendered as a drop down menu
|
|
|
where the user can click answers.
|
|
|
|
|
|
If only one item/solution is provided it will be rendered as a blank.
|
|
|
## Insert Choices Question {.qic}
|
|
|
|
|
|
```
|
|
|
## Insert Choices Question {.qic}
|
|
|
- [X] A
|
|
|
- of course
|
|
|
- [ ] B
|
|
|
- uhm ...
|
|
|
|
|
|
- [X] A
|
|
|
- of course
|
|
|
- [ ] B
|
|
|
- uhm ...
|
|
|
is the first letter in the ABC. The second one is
|
|
|
|
|
|
is the first letter in the ABC. The second one is
|
|
|
- [ ] B
|
|
|
- yep
|
|
|
|
|
|
- [ ] B
|
|
|
- yep
|
|
|
## FreeText questions
|
|
|
|
|
|
```
|
|
|
This will create a simple input field/text box where the user can write
|
|
|
their answer.
|
|
|
|
|
|
# FreeText questions
|
|
|
## FreeText Question TL {.qft}
|
|
|
|
|
|
This will create a simple input field/text box where the user can write their answer.
|
|
|
What's the first letter in the alphabet?
|
|
|
|
|
|
```
|
|
|
## FreeText Question TL {.qft}
|
|
|
- A
|
|
|
- yep
|
|
|
- B
|
|
|
- nope
|
|
|
|
|
|
What's the first letter in the alphabet?
|
|
|
## {.qft}
|
|
|
|
|
|
- A
|
|
|
- yep
|
|
|
- B
|
|
|
- nope
|
|
|
What's the fourth letter?
|
|
|
|
|
|
## {.qft}
|
|
|
- [ ] C
|
|
|
- [X] D
|
|
|
|
|
|
What's the fourth letter?
|
|
|
## Quiz Styling
|
|
|
|
|
|
- [ ] C
|
|
|
- [X] D
|
|
|
The default style of quizzes includes decorative and interactive features. To switch to a plain style, specify in YAML metadata, or use the `.plain` tag in the question header.
|
|
|
|
|
|
```.yaml
|
|
|
quiz:
|
|
|
style: plain
|
|
|
```
|
|
|
|
|
|
# Quiz Meta
|
|
|
```
|
|
|
# Question 1
|
|
|
|
|
|
## {.qmc .plain}
|
|
|
```
|
|
|
|
|
|
### Quiz Meta
|
|
|
|
|
|
Add a `YAML` code block to a question to provide meta information on the specific question.
|
|
|
|
|
|
This is work in progress. Currently it does not do anything. (17. Apr 2020)
|
|
|
````
|
|
|
``` {.yaml}
|
|
|
score: 5
|
|
|
category: FP
|
|
|
lectureId: fp1
|
|
|
topic: Functional Programming Introduction
|
|
|
```
|
|
|
```` |
|
|
This is work in progress. Currently this can only be used to specify the language and style of a question
|
|
|
|
|
|
``` {.yaml}
|
|
|
lang: de
|
|
|
quiz:
|
|
|
style: plain
|
|
|
``` |
|
|
\ No newline at end of file |