Documentation
¶
Overview ¶
Package openview builds the open view of a part of a module and of an instance of a template — what the learner's app receives: the part without its closed fields — from the marks x-open in the schemas of the format, and the digest of the open view of a task and of an instance (format/README.md, section 6; R05 spec; R93 spec). api, tutor's eval runner and the CLI's open call it.
Manifest, SkillGraph, Traps, Techniques, SolvingSteps, Lesson and Task take a part as the type of formatv0 holds it and give its open view as the type of formatv0/open holds it (R72 spec). The walk of the schemas is internal/schema's: a mark counts only where its subschema applies and passes, and no list of fields is kept here (R45 spec). The open view of an instance of a template is the open view of a task: Task of what template.Instance gives (format/README.md, section 23; R32). The digest comes with the task of the package (R16).
Index ¶
- func Lesson(part formatv0.Lesson) (open.Lesson, error)
- func Manifest(part formatv0.Manifest) (open.Manifest, error)
- func SkillGraph(part formatv0.SkillGraph) (open.SkillGraph, error)
- func SolvingSteps(part formatv0.SolvingSteps) (open.SolvingSteps, error)
- func Task(part formatv0.Task) (open.Task, error)
- func Techniques(part formatv0.Techniques) (open.Techniques, error)
- func Traps(part formatv0.Traps) (open.Traps, error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifest ¶
Manifest gives the open view of a manifest. It fails when the manifest is not valid against its schema, since the open view is the format's of a valid part alone.
func SkillGraph ¶
func SkillGraph(part formatv0.SkillGraph) (open.SkillGraph, error)
SkillGraph gives the open view of a skill graph, as Manifest does of a manifest.
func SolvingSteps ¶
func SolvingSteps(part formatv0.SolvingSteps) (open.SolvingSteps, error)
SolvingSteps gives the open view of the solving steps, as Manifest does of a manifest.
func Task ¶
Task gives the open view of a task, as Manifest does of a manifest: without its checks, its solution, its traps, its leak phrases and its template, among the other closed fields.
func Techniques ¶
func Techniques(part formatv0.Techniques) (open.Techniques, error)
Techniques gives the open view of a technique catalog, as Manifest does of a manifest.
Example ¶
view, err := Techniques(formatv0.Techniques{Techniques: map[formatv0.TechniqueID]formatv0.Technique{
"counting-gaps": {Title: "Count the gaps"},
}})
fmt.Println(view.Techniques["counting-gaps"].Title, err)
Output: Count the gaps <nil>
Types ¶
This section is empty.