Documentation
¶
Overview ¶
Package open holds the open view of each part of a module, as format/README.md defines it: the struct of each type the open view of a part reaches, by the name it has in formatv0, with the fields marked x-open alone, of version 0.6. An open view has no check, no template and no solver; a task's has its givens and its unknown. Strings, integers and enumerations are formatv0's.
Index ¶
- type AnswerSlot
- type Audience
- type Author
- type Band
- type Book
- type Canvas
- type CanvasSettings
- type DemoFill
- type DemoPart
- type ExampleLine
- type ExampleLinePart
- type ExplanationPart
- type Item
- type Languages
- type Lesson
- type LinePart
- type Manifest
- type ReadingList
- type Segment
- type SheetRectangle
- type Skill
- type SkillGraph
- type SolvingSteps
- type StatementPart
- type Step
- type Task
- type Technique
- type Techniques
- type Traps
- type WorkedExample
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnswerSlot ¶
type AnswerSlot struct {
// Where and how the learner gives the answer on a handwriting sheet: anywhere on it, where AI
// finds the final answer; the whole sheet, a work as a whole, such as an essay; in a zone of
// it; or by choosing one of the options.
Binding formatv0.AnswerSlotBinding `json:"binding"`
// The zone of the sheet where the learner writes the answer.
Zone *SheetRectangle `json:"zone,omitzero"`
// The options the learner chooses from, in the order they are shown.
Options []formatv0.Text `json:"options,omitzero"`
}
AnswerSlot is the open view of formatv0.AnswerSlot, the type of task.schema.json#/$defs/answer_slot: its fields marked x-open.
An answer slot of an item on a handwriting sheet: its binding, the zone or the options that the binding needs, and its check.
type Audience ¶
type Audience struct {
// The age categories that the module suits. The platform offers the module only to learners in
// one of them.
AgeCategories []formatv0.AgeCategory `json:"age_categories"`
// The school grades that the module is written for. A module that names them asks the learner's
// grade, and the answer may be one it does not name. Unlike the age categories, grades close
// nothing: the module and its skills stay open to a learner of any grade.
Grades []formatv0.Grade `json:"grades,omitzero"`
}
Audience is the open view of formatv0.Audience, the type of manifest.schema.json#/properties/audience: its fields marked x-open.
Whom the module is for: its age categories and, for a module written for school grades, those grades.
type Author ¶
type Author struct {
// The name of an author: a person or an organization.
Name formatv0.Text `json:"name"`
}
Author is the open view of formatv0.Author, the type of manifest.schema.json#/properties/authors/items: its fields marked x-open.
type Band ¶
type Band struct {
// The band's ID, by which a task names it.
ID formatv0.BandID `json:"id"`
// What the band is called, in the module's explanation language: Grades 1–2.
Title formatv0.Text `json:"title"`
// The school grades the band's tasks are written for, in a module that names grades: a learner
// of one of them starts in this band.
Grades []formatv0.Grade `json:"grades,omitzero"`
}
Band is the open view of formatv0.Band, the type of manifest.schema.json#/properties/bands/items: its fields marked x-open.
type Book ¶ added in v0.24.0
type Book struct {
// The title of the book, as its edition prints it, in one line of at most 200 characters.
Title formatv0.BookLine `json:"title"`
// Who wrote the book, as its edition prints them, in one line of at most 200 characters:
// several authors stand in this one line.
Author formatv0.BookLine `json:"author"`
// What the book helps with, in one paragraph of plain text of at most 400 characters in the
// module's explanation language: why the portrait offers it.
Helps formatv0.Text `json:"helps"`
// The skills of the module that the book serves, each by its local ID.
Skills []formatv0.SkillID `json:"skills,omitzero"`
// The areas that the book serves, each by its code.
Areas []formatv0.Area `json:"areas,omitzero"`
}
Book is the open view of formatv0.Book, the type of reading-list.schema.json#/$defs/book: its fields marked x-open.
A book: its title, its author, what it helps with, and the skills of the module or the areas that it serves, at least one of the two. It has no link and no price.
type Canvas ¶
type Canvas struct {
// The canvas kind: a handwriting sheet, a free sheet of 1000 × 1400 units; or a workbook, lines
// of items with boxes for the answers.
Kind formatv0.CanvasKind `json:"kind"`
// The grid of a handwriting sheet: squares, lines or dots; squares unless given.
//
// Default: "squares".
Grid *formatv0.CanvasGrid `json:"grid,omitzero"`
// The step of the grid of a handwriting sheet, in its units: 50 unless given.
//
// Default: 50.
GridStep *int64 `json:"grid_step,omitzero"`
}
Canvas is the open view of formatv0.Canvas, the type of common.schema.json#/$defs/canvas: its fields marked x-open.
A canvas: its kind, and the grid of a handwriting sheet.
type CanvasSettings ¶
type CanvasSettings struct {
// The height in px that a digit or a letter of the learner's writing has on the crop that goes
// to be read: 24 unless given.
//
// Default: 24.
DigitHeight *int64 `json:"digit_height,omitzero"`
}
CanvasSettings is the open view of formatv0.CanvasSettings, the type of manifest.schema.json#/properties/canvas: its fields marked x-open.
The settings of the module's canvas, the same for each of its tasks.
type DemoFill ¶ added in v0.10.0
type DemoFill struct {
// The line, by its place among the example's lines, from 1.
Line int64 `json:"line"`
// The box, by its place among the boxes of the line, from 1.
Box int64 `json:"box"`
}
DemoFill is the open view of formatv0.DemoFill, the type of lesson.schema.json#/$defs/demo_fill: its fields marked x-open.
A box of a worked example's lines, by its line and its place in it.
type DemoPart ¶
type DemoPart struct {
// A paragraph of the demo, as plain text.
Text *formatv0.Text `json:"text,omitzero"`
// A picture of the demo, by its path from media/.
Picture *formatv0.PicturePath `json:"picture,omitzero"`
// What the picture shows, in words: a screen reader reads it, and it stands in the picture's
// place until the picture comes. Empty for a picture that only decorates.
Alt *string `json:"alt,omitzero"`
// The width that a picture beside the sheet is shown at, in CSS px.
Width *int64 `json:"width,omitzero"`
// The height that a picture beside the sheet is shown at, in CSS px, in proportion to its
// width.
Height *int64 `json:"height,omitzero"`
// The area of the sheet that a picture on the sheet is shown in, at its size, on the canvas
// layer of the author's demo.
Area *SheetRectangle `json:"area,omitzero"`
// Of a worked example on a workbook: the box that this part of the demo fills with its value.
Fill *DemoFill `json:"fill,omitzero"`
}
DemoPart is the open view of formatv0.DemoPart, the type of lesson.schema.json#/$defs/demo_part: its fields marked x-open.
A part of the author's demo: a paragraph; a picture beside the sheet, with what it shows and its size; a picture on the sheet, with what it shows and its area; or, on a workbook, a box filled.
type ExampleLine ¶ added in v0.10.0
type ExampleLine struct {
// The pieces of the line, in order, a box among them at least.
Line []ExampleLinePart `json:"line"`
}
ExampleLine is the open view of formatv0.ExampleLine, the type of lesson.schema.json#/$defs/example_line: its fields marked x-open.
A line of a worked example on a workbook.
type ExampleLinePart ¶ added in v0.10.0
type ExampleLinePart struct {
// A piece of text of the line.
Text *formatv0.Text `json:"text,omitzero"`
// A box of the line.
Binding *string `json:"binding,omitzero"`
// Of a box: what the demo writes in it when a part fills it.
Value *formatv0.Text `json:"value,omitzero"`
}
ExampleLinePart is the open view of formatv0.ExampleLinePart, the type of lesson.schema.json#/$defs/example_line_part: its fields marked x-open.
A piece of a line of a worked example: a piece of text, or a box with what the demo writes in it.
type ExplanationPart ¶ added in v0.10.0
type ExplanationPart struct {
// A paragraph, as plain text.
Text *formatv0.Text `json:"text,omitzero"`
// A picture, by its path from media/: a lesson has no template, so its path holds no
// placeholder.
Picture *formatv0.PicturePath `json:"picture,omitzero"`
// What the picture shows, in words: a screen reader reads it, and it stands in the picture's
// place until the picture comes. Empty for a picture that only decorates.
Alt *string `json:"alt,omitzero"`
// The width the picture is shown at, in CSS px; narrower when the text it stands in is.
Width *int64 `json:"width,omitzero"`
// The height the picture is shown at, in CSS px, in proportion to its width.
Height *int64 `json:"height,omitzero"`
// A numbered list: its texts in order, such as the steps of a method, each a short text that
// does not begin with a number of its own, as 1. or 1) does. The learner's app draws the
// numbers, so the leak check reads none of them; it searches the texts as it searches the
// paragraphs.
NumberedList []formatv0.Text `json:"numbered_list,omitzero"`
}
ExplanationPart is the open view of formatv0.ExplanationPart, the type of lesson.schema.json#/$defs/explanation_part: its fields marked x-open.
A part of an explanation: a numbered list, or a paragraph or a picture with what it shows and its size, as a part of a task's statement is; a lesson's picture path holds no placeholder.
type Item ¶
type Item struct {
// What the item asks, on a handwriting sheet, beside its answer slots: a) or a question.
Text *formatv0.Text `json:"text,omitzero"`
// The answer slots of an item on a handwriting sheet, each named by its place in the item, from
// 1.
AnswerSlots []AnswerSlot `json:"answer_slots,omitzero"`
// An item of a workbook: pieces of text and boxes in order, as 7 × [ ] = 56, and at least one
// box. Its boxes are its answer slots, each named by its place among them, from 1.
Line []LinePart `json:"line,omitzero"`
}
Item is the open view of formatv0.Item, the type of task.schema.json#/$defs/item: its fields marked x-open.
An item of the task: on a handwriting sheet, its answer slots and what it asks; on a workbook, a line of text and boxes.
type Languages ¶
type Languages struct {
// The explanation language: the one language in which the module explains and the tutor speaks
// with the learner. Every text of the module is in it, except the material of a language
// module, which is in its target language.
Explanation formatv0.LanguageTag `json:"explanation"`
// The target language: the one that a language module teaches. Other modules have none.
Target *formatv0.LanguageTag `json:"target,omitzero"`
}
Languages is the open view of formatv0.Languages, the type of manifest.schema.json#/properties/languages: its fields marked x-open.
The languages of the module.
type Lesson ¶
type Lesson struct {
// The lesson's local ID: the name of its file, without .yaml.
ID formatv0.LessonID `json:"id"`
// What the lesson is called, in the module's explanation language. The learner sees it before
// every task of the lesson, and the leak check searches it for their keys.
Title formatv0.Text `json:"title"`
// The segments of the lesson, in the author's order: explanations, worked examples and tasks.
// No two are the same.
Segments []Segment `json:"segments"`
}
Lesson is the open view of formatv0.Lesson, the type of lesson.schema.json: its fields marked x-open.
A lesson of a module: a sequence that its author made — explanations, worked examples and tasks, in order — and the skills of the module that it teaches. The skill graph orders the lessons.
type LinePart ¶
type LinePart struct {
// A piece of the line's text.
Text *formatv0.Text `json:"text,omitzero"`
// A box of the line, an answer slot where the learner writes the answer.
Binding *formatv0.LinePartBinding `json:"binding,omitzero"`
}
LinePart is the open view of formatv0.LinePart, the type of task.schema.json#/$defs/line_part: its fields marked x-open.
A piece of a line: a piece of text, or a box with its check.
type Manifest ¶
type Manifest struct {
// The version of the module format the module is written in, "0.3": the module is checked,
// built and run by it. It stands at the root of the manifest in every version of the format, so
// that a reader finds it before it knows which schemas to read the module by.
ModuleFormatVersion formatv0.ModuleFormatVersion `json:"module_format_version"`
// The module's ID: novatrail/olympiad-math.
ID formatv0.ModuleID `json:"id"`
// The module's version, X.Y.Z.
Version formatv0.ModuleVersion `json:"version"`
// What the module is called, in its explanation language.
Title formatv0.Text `json:"title"`
// What the module teaches, in one line of at most 120 characters in its explanation language:
// what the learner's app shows under its title, on its card and on its page.
Tagline *formatv0.Text `json:"tagline,omitzero"`
// What the module is, whom it suits and how it teaches, in at most 8 paragraphs of at most 1000
// characters each, in its explanation language: what the page of the module shows.
Description []formatv0.Text `json:"description,omitzero"`
// What the module teaches.
Subject formatv0.Subject `json:"subject"`
// How the platform gives the module's tasks. adaptive, unless given: the engine chooses the
// next task for a learner by the learner model, and the work is evidence of the module's
// skills. fixed: the module is a fixed set, whose tasks the platform gives all at once, the
// same to every learner, in the order of their local IDs; it keeps whether each is solved, and
// the work is evidence of no skill.
//
// Default: "adaptive".
Selection *formatv0.ManifestSelection `json:"selection,omitzero"`
// Whom the module is for: its age categories and, for a module written for school grades, those
// grades.
Audience Audience `json:"audience"`
// The bands of the module's difficulty scale, from the easiest: each task names its band and a
// difficulty from 1 to 5 within it. A module with tasks has them.
Bands []Band `json:"bands,omitzero"`
// The example tasks of the module, at most 12, by local ID, in the order the page of the module
// shows them: the author SHOULD name one for each band. The platform shows each with its band,
// its difficulty and its primary skills, which a task keeps closed: naming a task here opens
// them for it. An example is neither a template nor a task with age categories of its own.
Examples []formatv0.TaskID `json:"examples,omitzero"`
// The languages of the module.
Languages Languages `json:"languages"`
// The anchor skills of the shared taxonomy that the module's skills need: exactly those that
// its skill graph names as prerequisites. A module whose skills need none leaves this field
// out.
Dependencies []formatv0.SharedTaxonomy `json:"dependencies,omitzero"`
// The settings of the module's canvas, the same for each of its tasks.
Canvas *CanvasSettings `json:"canvas,omitzero"`
// Who wrote the module.
Authors []Author `json:"authors"`
// The license of the module's content: Apache-2.0 for an official module.
License formatv0.License `json:"license"`
// The templates of rungs 1 and 2 of the hint ladder, in order, in the module's explanation
// language: what the learner reads after a wrong answer when the tutor's question did not come
// or did not pass its checks, and neither a trap text nor a trap's advice fits. A module with
// an item with a verdict has them.
RungTemplates []formatv0.Text `json:"rung_templates,omitzero"`
}
Manifest is the open view of formatv0.Manifest, the type of manifest.schema.json: its fields marked x-open.
The manifest of a module, manifest.yaml at the root of its folder: the format version the module is written in, its ID and version, what it is called and teaches, its tagline and description, how its tasks are given, whom it is for, the bands of its difficulty scale, its example tasks, its languages, the anchor skills it builds on, the settings of its canvas, its authors and its license, and the templates of the rungs of its hint ladder. Every field is open, since the learner's app shows them.
type ReadingList ¶ added in v0.24.0
type ReadingList struct {
// The books of the reading list, in the order the author gives them. No two of them have the
// same title and author.
Books []Book `json:"books"`
}
ReadingList is the open view of formatv0.ReadingList, the type of reading-list.schema.json: its fields marked x-open.
The reading list of a module, reading-list.yaml at the root of its folder: the books that its author recommends for its skills and for areas, each with what it helps with. A module with no books has no reading list. The portrait of the cognitive map picks books only from the reading lists of the learner's modules. Every field is open.
type Segment ¶
type Segment struct {
// An explanation: paragraphs, pictures and numbered lists that the learner reads, in order, in
// the module's explanation language.
Explanation []ExplanationPart `json:"explanation,omitzero"`
// A worked example: an example solved before the learner's eyes, on a handwriting sheet.
WorkedExample *WorkedExample `json:"worked_example,omitzero"`
// A task of the module, by its local ID. The next segment begins when the task ends.
Task *formatv0.TaskID `json:"task,omitzero"`
}
Segment is the open view of formatv0.Segment, the type of lesson.schema.json#/$defs/segment: its fields marked x-open.
A segment of a lesson: an explanation, a worked example or a task, by its one field.
type SheetRectangle ¶
type SheetRectangle struct {
// How far the rectangle begins from the left edge of the sheet, in its units.
Left int64 `json:"left"`
// How far the rectangle begins from the top edge of the sheet, in its units.
Top int64 `json:"top"`
// The width of the rectangle, in units of the sheet.
Width int64 `json:"width"`
// The height of the rectangle, in units of the sheet.
Height int64 `json:"height"`
}
SheetRectangle is the open view of formatv0.SheetRectangle, the type of common.schema.json#/$defs/sheet_rectangle: its fields marked x-open.
A rectangle of the handwriting sheet, in its units of 1000 × 1400 from the top left corner.
type Skill ¶
type Skill struct {
// What the skill is called, in the module's explanation language.
Title formatv0.Text `json:"title"`
// What a learner who has the skill can do, in the module's explanation language.
Description *formatv0.Text `json:"description,omitzero"`
// The skills that a learner needs before this one, all of them: skills of the module by local
// ID, and anchor skills of the shared taxonomy by their IDs. A skill with none leaves this
// field out.
Prerequisites []string `json:"prerequisites,omitzero"`
// The anchor skills of the shared taxonomy that this skill teaches: a learner who has this
// skill can do what the description of each says. Other modules build on them, and the learner
// model decides by such skills whether a learner has them. A skill that teaches none leaves
// this field out.
Teaches []formatv0.SharedTaxonomy `json:"teaches,omitzero"`
// How the platform can know a learner's command of the skill: verdict, when its tasks are
// checked against a key or a predicate; rubric, when work on it gets feedback by the author's
// rubric and no verdict; none, when it is practised and not assessed.
Assessability formatv0.SkillAssessability `json:"assessability"`
// The area of the cognitive map that the skill stands in, by its code. A skill that names none
// stands in the fallback area of its module's subject, which format/areas.yaml gives.
Area *formatv0.Area `json:"area,omitzero"`
}
Skill is the open view of formatv0.Skill, the type of skill-graph.schema.json#/properties/skills/additionalProperties: its fields marked x-open.
A skill of the module, under its local ID.
type SkillGraph ¶
type SkillGraph struct {
// The names of the tiers, in order from tier 1. The tiers past the last name are shown by their
// numbers, and a name past the last tier names none.
Tiers []formatv0.Text `json:"tiers,omitzero"`
// The module's skills, each under its local ID. Their order carries no meaning.
Skills map[formatv0.SkillID]Skill `json:"skills"`
}
SkillGraph is the open view of formatv0.SkillGraph, the type of skill-graph.schema.json: its fields marked x-open.
The skill graph of a module, skill-graph.yaml at the root of its folder: the module's skills, what a learner needs before each one, how the platform can know a learner's command of each, which anchor skills of the shared taxonomy each one teaches, the area each one stands in, the names of the tiers, and the skills that the module had once and has no more. The tier of a skill is computed from the prerequisites, never written, and module-kit puts it into the module's package, with the area of every skill, its fallback filled in. Every field is open but retired_skills, since the skill map shows them.
type SolvingSteps ¶
type SolvingSteps struct {
// The steps, in order, each named by its place, from 1.
Steps []Step `json:"steps"`
}
SolvingSteps is the open view of formatv0.SolvingSteps, the type of solving-steps.schema.json: its fields marked x-open.
The solving steps of a module, solving-steps.yaml at the root of its folder: the frame through which the tutor leads a learner within a task, step by step, each with its title, what of the task it gives and when it ends. Every task of the module goes through the same steps. Every field is open, since the learner's app leads the steps itself.
type StatementPart ¶
type StatementPart struct {
// A paragraph, as plain text.
Text *formatv0.Text `json:"text,omitzero"`
// A picture, by its path from media/; in a task, a template's may hold placeholders, and a
// lesson's holds none.
Picture *formatv0.TaskPicturePath `json:"picture,omitzero"`
// What the picture shows, in words: a screen reader reads it, and it stands in the picture's
// place until the picture comes. Empty for a picture that only decorates.
Alt *string `json:"alt,omitzero"`
// The width the picture is shown at, in CSS px; narrower when the text it stands in is.
Width *int64 `json:"width,omitzero"`
// The height the picture is shown at, in CSS px, in proportion to its width.
Height *int64 `json:"height,omitzero"`
}
StatementPart is the open view of formatv0.StatementPart, the type of common.schema.json#/$defs/statement_part: its fields marked x-open.
A part of a text that the learner reads — a statement, a solution, the statement of a worked example, or a paragraph or a picture of an explanation, which the lesson's own explanation_part repeats: a paragraph, or a picture with what it shows and its size.
type Step ¶
type Step struct {
// What the learner does in the step, in the module's explanation language.
Title formatv0.Text `json:"title"`
// How to go through the step, in the module's explanation language, which the learner's app
// shows beside its title. Every task of the module goes through the step, so the leak check
// searches it for the keys of every task.
Description *formatv0.Text `json:"description,omitzero"`
// What of the task the step gives the learner: givens, the task's givens and unknown, which the
// learner ticks; techniques, the task's techniques, which the server gives when the step
// begins. A step that gives neither leaves this field out.
Gives []formatv0.StepGives `json:"gives,omitzero"`
// When the step ends, by an event on the learner's device and with no key: givens_ticked, once
// the learner has ticked every given and the unknown; answer_slots_filled, once every answer
// slot of the task holds something of the learner's; none, when the learner moves on.
ExitCondition formatv0.StepExitCondition `json:"exit_condition"`
}
Step is the open view of formatv0.Step, the type of solving-steps.schema.json#/$defs/step: its fields marked x-open.
A solving step: what the learner does in it, what of the task it gives, and when it ends.
type Task ¶
type Task struct {
// The task's local ID: the name of its file, without .yaml.
ID formatv0.TaskID `json:"id"`
// The statement of the task, what the learner reads: paragraphs and pictures in order, in the
// module's explanation language. Whether it stands above the canvas or on it is the canvas
// kind's to decide.
Statement []StatementPart `json:"statement"`
// The canvas of the task, one for all its items: its kind and the kind's settings.
Canvas Canvas `json:"canvas"`
// The items of the task, each named by its place, from 1. On a handwriting sheet an item has
// answer slots; on a workbook it is a line of text and boxes.
Items []Item `json:"items"`
// What the statement gives, each a short text in the module's explanation language: the chips
// that the learner ticks at a solving step that gives them, and what a hint asked for gives
// before the first answer.
Givens []formatv0.Text `json:"givens,omitzero"`
// What the task asks to find, in the module's explanation language: the chip that the learner
// ticks beside the givens.
Unknown *formatv0.Text `json:"unknown,omitzero"`
}
Task is the open view of formatv0.Task, the type of task.schema.json: its fields marked x-open.
A task of a module, tasks/<id>.yaml in its folder: its statement, its canvas, its items with their answer slots, each with the check that says what is right in it, the skills it trains, its band and difficulty, and, when they are fewer than the module's, the age categories it is for; and what helps the learner on the way: what the statement gives and asks, the techniques that help, the traps that AI may suggest, a simpler case for each item, the solution and the phrases that give the answer away. The ID, the statement, the canvas, the items, the givens and the unknown are open, since the learner's app shows them, but for the skills and the simpler case of an item and the check of each answer slot; those, the skills, the band, the difficulty, the age categories, the techniques, the traps, the solution, the leak phrases and the template are closed, since the server reads them. A task with a template is a template of tasks: each attempt gets one instance of it, with numbers in the place of its placeholders.
type Technique ¶
type Technique struct {
// What the technique is called, in the module's explanation language.
Title formatv0.Text `json:"title"`
// What the technique is and when it helps, in the module's explanation language.
Description *formatv0.Text `json:"description,omitzero"`
}
Technique is the open view of formatv0.Technique, the type of techniques.schema.json#/properties/techniques/additionalProperties: its fields marked x-open.
A technique of the module, under its local ID.
type Techniques ¶
type Techniques struct {
// The module's techniques, each under its local ID. Their order carries no meaning, and this
// version gives them no numbers.
Techniques map[formatv0.TechniqueID]Technique `json:"techniques"`
}
Techniques is the open view of formatv0.Techniques, the type of techniques.schema.json: its fields marked x-open.
The technique catalog of a module, techniques.yaml at the root of its folder: the ways of solving that the module names and teaches, each under its local ID, with its title and what it is. A task names the techniques that help in it, and which those are is closed, in the task. Every field of the catalog is open, as the skills of the skill graph are.
type Traps ¶
type Traps struct{}
Traps is the open view of formatv0.Traps, the type of traps.schema.json: its fields marked x-open.
The trap catalog of a module, traps.yaml at the root of its folder: the typical mistakes that the module's tasks catch, each under its local ID, with what the mistake is, the skills it belongs to and what to advise on it. A task names only a trap of the catalog, so that a wrong answer becomes a diagnosis that can be counted. Every field is closed, since a trap tells what mistake a task expects.
type WorkedExample ¶
type WorkedExample struct {
// What the example asks: paragraphs and pictures in order, as a task's statement.
Statement []StatementPart `json:"statement"`
// What the author's demo is shown on: a handwriting sheet and its grid, or a workbook, the
// example's lines with their boxes. The learner does not write on it.
Canvas Canvas `json:"canvas"`
// On a workbook: the example's lines, each with its boxes and what they hold, laid out on the
// page as a task's lines are.
Lines []ExampleLine `json:"lines,omitzero"`
// The author's demo: the parts of how the example is solved, in order, which the learner opens
// one at a time and may hide.
Demo []DemoPart `json:"demo"`
}
WorkedExample is the open view of formatv0.WorkedExample, the type of lesson.schema.json#/$defs/worked_example: its fields marked x-open.
A worked example of a lesson: no task, with no answer slots and no key. On a handwriting sheet the demo shows pictures on the sheet; on a workbook it fills the boxes of the example's lines.