ChalmersGU-data-structure-courses / dsabook

Updated online interactive course book in data structures and algorithms
https://chalmersgu-data-structure-courses.github.io/dsabook/
MIT License
0 stars 1 forks source link

New infrastructure for quizzes #8

Open heatherleaf opened 2 months ago

heatherleaf commented 2 months ago

The current way of writing quizzes (e.g. multiple choice questions) is complicated: each question has to be a single html page, and then another html page for collecting them. Plus a lot of extra fluff to for grading them etc.

There should be an easy way to do this directly in Markdown. Here are some libraries that could be inspirations:

heatherleaf commented 1 month ago

Pandoc Markdown supports task lists, just as here: https://pandoc.org/MANUAL.html#extension-task_lists

So here's a suggestion:

:::: quiz
### Quiz intro text

::: question
Question 1 text

- [ ] Wrong answer
- [x] Correct answer
- [ ] Also wrong
:::

::: question
Question 2 text

- [x] A
- [ ] B
:::

Quiz end text
::::

Plus some javascript that shows one question and the time, plus some buttons etc.