You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document lesson directory structure, lesson.yaml metadata, and page
types (content, true/false, multichoice) with front matter examples.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| `type` | Activity type: `page`(default), `label`, or `url`. Books are created from directories, not front matter. Other Moodle activity types (quiz, forum, assign, etc.) are not yet implemented. Unrecognized types are treated as `page`. |
131
+
| `type` | Activity type: `page`(default), `label`, or `url`. Books and Lessons are created from directories, not front matter. Other Moodle activity types (quiz, forum, assign, etc.) are not yet implemented. Unrecognized types are treated as `page`. |
127
132
| `name` | Override the activity name (otherwise derived from filename) |
128
133
| `url` | External URL (required for `type: url`) |
129
134
| `visible` | `true` or `false` |
@@ -185,6 +190,109 @@ subchapter: true
185
190
-**Modified book.yaml**: Updates book name, numbering, and intro without touching chapters
186
191
-**Reordered chapters** (renamed with different numeric prefixes): Page numbers are updated even if content is unchanged
187
192
193
+
### Lesson Activities
194
+
195
+
A subdirectory inside a section directory that contains a `lesson.yaml` file (or has its name recognized as a lesson) becomes a **Lesson** activity. Each `.html` file in the subdirectory becomes a lesson page. Pages can be content pages, true/false questions, or multichoice questions, controlled by YAML front matter.
196
+
197
+
```
198
+
sections/
199
+
01-introduction/
200
+
03-safety-training/ # -> Lesson "Safety Training"
201
+
lesson.yaml # Optional metadata
202
+
01-introduction.html # -> Content page
203
+
02-hazard-check.html # -> True/false question
204
+
03-procedure-quiz.html # -> Multichoice question
205
+
```
206
+
207
+
#### lesson.yaml
208
+
209
+
Optional. Sets lesson-level metadata:
210
+
211
+
```yaml
212
+
title: "Safety Training"
213
+
intro: "<p>Complete this lesson to demonstrate your understanding.</p>"
214
+
practice: false
215
+
retake: true
216
+
feedback: true
217
+
review: false
218
+
maxattempts: 3
219
+
progressbar: true
220
+
```
221
+
222
+
| Field | Description |
223
+
|-------|-------------|
224
+
| `title` | Override the lesson name (otherwise derived from directory name) |
225
+
| `intro` | HTML description shown on the lesson's intro page |
226
+
| `practice` | Practice lesson — no grades recorded (default: `false`) |
227
+
| `retake` | Allow students to retake the lesson (default: `true`) |
228
+
| `feedback` | Show feedback after answering (default: `true`) |
229
+
| `review` | Allow students to review their answers (default: `false`) |
230
+
| `maxattempts` | Maximum number of attempts (default: `1`) |
231
+
| `progressbar` | Show progress bar (default: `true`) |
232
+
233
+
#### Lesson Page Types
234
+
235
+
Each HTML file in a lesson directory becomes a page. The page type is set via front matter:
236
+
237
+
**Content page** (default — no front matter needed):
0 commit comments