Skip to content
Article Quiz System
☀️ Light Clean and bright
📜 Sepia Warm and vintage
🌤️ Light Gray Subtle and neutral
🔵 Light Blue Calm and serene
🌙 Dark Easy on the eyes
🌑 Dark Gray Deep and modern
🔷 Dark Blue Professional and sleek
🌿 Forest Calm and natural

Quiz System

The quiz system allows you to create interactive assessments for your courses. Quizzes are written in Markdown files with front matter configuration and support various question types, scoring, and user progress tracking.

File Location

Quizzes live under content/pages/courses/. The file path becomes the URL.

File naming. Lower case, words separated by hyphens. The name becomes part of the URL — choose it for the topic, not for today's version.

Front Matter

The block is a small YAML subset. Keys are lower case.

Required

KeyTypeDescription
titlestringQuiz title shown on the page
quizbooleanMust be true to identify the file as a quiz

Optional

KeyTypeDefaultDescription
course_slugstring""Course this quiz belongs to (e.g., courses/intro-web-dev.md)
collectEmailbooleanfalseCollect email from guest users
reviewAnswersOnSubmitbooleantrueShow correct/incorrect after submission
requireLoginbooleantrueUser must be logged in to take the quiz
requireEnrollmentbooleantrueUser must be enrolled in the course
passingScoreinteger70Percentage required to pass (0-100)
timeLimitinteger0Time limit in minutes (0 = unlimited)
showResultsImmediatelybooleanfalseShow results immediately after submission
allowRetakebooleanfalseAllow users to retake the quiz
maxAttemptsinteger0Maximum attempts (0 = unlimited)
descriptionstring""Optional description below the quiz title

Example Front Matter

---
title: "Module 1 Quiz: Introduction to Web Development"
quiz: true
course_slug: courses/intro-web-dev.md
requireLogin: true
requireEnrollment: true
passingScore: 70
reviewAnswersOnSubmit: true
allowRetake: false
maxAttempts: 2
timeLimit: 15
description: "Test your understanding of the basic concepts covered in Module 1."
---

Question Format

Each question follows a numbered pattern. Questions must be numbered sequentially starting from

Basic Structure

---
question1: Your question text here
answerForQuestion1: Correct answer
questionType1: text
questionRequired1: true
questionExplanation1: Explanation for the correct answer
---

---
title: "HTML & CSS Basics Quiz"
quiz: true
course_slug: courses/intro-web-dev.md
requireLogin: true
requireEnrollment: true
passingScore: 70
reviewAnswersOnSubmit: true
allowRetake: false
maxAttempts: 2
timeLimit: 10
description: "Test your knowledge of HTML and CSS fundamentals."

---
question1: What is the correct HTML element for creating a hyperlink?
questionType1: multipleChoice
questionOptions1: <a>|<link>|<href>|<url>
questionCorrectOptions1: 0
questionRequired1: true
questionExplanation1: The <a> (anchor) element is used for creating hyperlinks.

question2: Which CSS property is used to change the background color?
questionType2: multipleChoice
questionOptions2: color|background-color|bgcolor|background
questionCorrectOptions2: 1
questionRequired2: true
questionExplanation2: background-color is the CSS property used to set the background color.

question3: What does CSS stand for?
answerForQuestion3: Cascading Style Sheets
questionType3: text
questionRequired3: true
questionExplanation3: CSS stands for Cascading Style Sheets — it's used to style HTML documents.

question4: Which of these are valid HTML semantic elements?
questionType4: multipleSelect
questionOptions4: <header>|<footer>|<nav>|<div>|<span>
questionCorrectOptions4: 0,1,2
questionRequired4: true
questionExplanation4: <header>, <footer>, and <nav> are semantic HTML5 elements. <div> and <span> are non-semantic.

question5: Explain the difference between inline and block elements.
answerForQuestion5: Inline elements don't start on a new line and only take up as much width as needed. Block elements start on a new line and take up the full width available.
questionType5: longText
questionRequired5: false
---