openview

package
v0.1.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lesson

func Lesson(part formatv0.Lesson) (open.Lesson, error)

Lesson gives the open view of a lesson, as Manifest does of a manifest.

func Manifest

func Manifest(part formatv0.Manifest) (open.Manifest, error)

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

func Task(part formatv0.Task) (open.Task, error)

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>

func Traps

func Traps(part formatv0.Traps) (open.Traps, error)

Traps gives the open view of a trap catalog, as Manifest does of a manifest: every field of the catalog is closed, so its open view is an empty object.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL