Training blocks (optional module)
The training view's data (schema/training.wcl): ordered lessons (grouped into modules when the course has parts), each ending in exercises with expected results.
| Property | Type | Required | Description |
|---|---|---|---|
| id | identifier | yes | |
| title | utf8 | yes | |
| summary | utf8 | no | |
| n | u32 | yes | |
| objectives | list<utf8> | no | |
| prerequisites | list<identifier> | no | |
| related | list<identifier> | no | |
| tags | list<utf8> | no |
Child blocks
| Slot | Accepts | Multiple | Description |
|---|---|---|---|
| body | body | no | |
| exercises | exercise | yes |
§ 1.1Exercise
| Property | Type | Required | Description |
|---|---|---|---|
| id | identifier | yes | |
| title | utf8 | yes | |
| task | utf8 | yes | |
| code_lang | utf8 | no | |
| code | utf8 | no | |
| expected | utf8 | no | |
| hint | utf8 | no |
Child blocks
| Slot | Accepts | Multiple | Description |
|---|---|---|---|
| body | body | no |
§ 1.2TrainingModule
| Property | Type | Required | Description |
|---|---|---|---|
| id | identifier | yes | |
| title | utf8 | yes | |
| summary | utf8 | no | |
| n | u32 | yes |
Child blocks
| Slot | Accepts | Multiple | Description |
|---|---|---|---|
| lessons | lesson | yes |
wcl
lesson first_commit {
n = 1
title = "Your first commit"
objectives = ["Record a snapshot in a new repository"]
related = [git_cli]
body { p "The lesson material — any wdoc blocks." }
exercise commit_it {
title = "Commit a file"
task = "Stage and commit README.md."
code_lang = "bash"
code = "git add README.md && git commit -m 'docs: add readme'"
expected = "`git log --oneline` shows your commit at the top."
}
}