Learning Studio / features
zero-UI activities (dev build)
Import a zero-UI activity export as a managed component, configure its placement, and see how its results, state and theme behave in the preview and in LMS packages.
zero-UI activities are interactive components — sorters, matchers, simulations and more — exported from the zero-UI tool and imported into NXGen as a managed component embed. This feature is available on the dev build only. A production build shows neither the import button nor the activity settings.
What an activity is
Section titled “What an activity is”A zero-UI activity export is a ZIP package built around an activity.json manifest. The manifest names the activity (id and a semver version), declares its kind, whether it is scored and its masteryScore, the interactions it can report, and a stateBudget in bytes. The export also carries the component itself (inlined into one index.html for NXGen), an optional config.json with the activity’s settings, an optional config.schema.json describing those settings, and the shared zui-activity-runtime.js.
When you import an export that includes a valid manifest, NXGen stores the component as a managed embed and attaches an activity placement to the block. The placement records the pinned manifest version, the author’s Graded and Required choices, the configuration, and the state budget. An export without a manifest imports exactly as before — as an ordinary managed component with no placement.
Import an activity
Section titled “Import an activity”On the dev build, use Import zero-UI export (.zip) to import an export. The import runs the same checks as any component import — a package with issues is refused with every issue listed, and nothing is stored — and then reads the manifest. The block’s properties gain a zeroUI activity section showing the activity’s kind and pinned version, with these settings:
- Graded — counts the activity’s result toward the course score. Available only when the manifest reports a score; an unscored activity keeps this off.
- Required for completion — the learner must finish the activity before the course counts as complete. Graded imports start with both switches on; unscored imports start with both off.
- Configuration — the activity’s settings from the export’s
config.json, or empty when the export has none. When the export ships aconfig.schema.json, the editor becomes a form built from that schema: each setting gets its own labeled field with the schema’s help text, lists gain Add item and Remove item buttons, and Apply configuration checks every value against the schema before saving — a value outside the schema’s rules is flagged inline and nothing saves. Choose Edit as JSON for the raw JSON editor and Use form to switch back; exports without a schema keep the JSON editor. Either way, Apply configuration saves as one undoable change, and malformed JSON never saves. - Update activity… — replaces the placement with a newer export of the same activity. The pin stays reproducible: an export for a different activity is refused (a different activity needs its own placement), an older version applies only after you confirm the downgrade, and a configuration that no longer fits the new version’s schema is listed with the choice to use the new version’s defaults or cancel. Graded, Required and a valid configuration carry over; saved learner progress passes to the component unchanged, because the component migrates its own state on load. A jump across a major version is flagged in Course review, because the component may reset progress it can no longer read.
How results count toward completion
Section titled “How results count toward completion”A required placement must be completed before the course counts as complete, and it appears in the learner’s “What’s left on this page” list the same way a checklist or scored quiz does. Each graded placement contributes its scaled score to the course score on equal footing with the scored-quiz total — the quiz total counts as one item, and each graded placement as one more.
The course counts as passed only when every graded placement reports a pass against its own mastery check: the component judges its own masteryScore and reports passed, failed or unknown. An explicit pass wins, an explicit fail loses, and unknown — or a missing result — counts as passed only when the placement sets no masteryScore. Ungraded placements never judge mastery.
What a placement reports to an LMS
Section titled “What a placement reports to an LMS”In a downloaded LMS package, a placement reports to the LMS alongside the course’s scored quizzes. The course completion, score and pass or fail sent to the LMS use the same rules as the preview, so a required or graded placement affects them the same way it does in NXGen.
Each answer the component sends becomes an interaction record the LMS can inspect:
- SCORM 2004 keeps the full detail: the interaction’s id, type, learner response, result, correct responses and an ISO-8601 latency.
- SCORM 1.2 stores a simplified form:
long-fill-indowngrades tofill-in,othertoperformance, anincorrectresult towrong, responses are unescaped to at most 255 characters, and latency isHH:MM:SS. - cmi5 emits one
answeredstatement per interaction, with acmi.interactionactivity definition under the activity’s parent and the response, success and duration in the result.
The placement’s saved state comes back when the learner resumes. In-flight progress — how far through the activity the learner is, before it completes — is reported to cmi5 as progressed statements only when the course setting Send cmi5 progress updates (in the completion settings) is on; it is off by default, because most LMSs don’t need it. SCORM 1.2 does not store progress at all.
State budgets and suspend-data overflow
Section titled “State budgets and suspend-data overflow”A placement saves the learner’s component state inside the course’s suspend data, up to its state budget. A placement’s budget is whole bytes from 0 to 16,384, defaulting to 4,096; the effective budget is the smaller of the placement’s budget and what the host format allows — 400 bytes per component on SCORM 1.2, 4,096 bytes on SCORM 2004, cmi5 and the web player. When a placement’s budget exceeds 400 bytes, Course review flags it with an advisory warning: a saved state larger than the effective budget is not stored, and the learner restarts the activity on the next visit.
The course’s whole suspend payload also has a host total: 4,096 characters on SCORM 1.2, 64,000 characters on SCORM 2004, and 64,000 UTF-8 bytes for the cmi5 state document (cmi5 packs against the limit minus a small margin, so the usable size is slightly under 64,000 bytes). Required learner data packs first and no saved state may displace it — visited pages and location, quiz results and attempts, the completion date, and every placement’s result and attempt. Each placement’s saved state then fills the remaining space, most recently updated first. A state that doesn’t fit is dropped whole — never truncated — so that learner restarts the activity’s in-progress attempt on the next visit while its completed result survives. If the payload still overflows without any saved states, the package sheds page progress before quiz and activity results, exactly as packages always have; only in the extreme case where even the essential progress data alone overflows is it written anyway and the LMS decides. Dev builds warn once per session when states are dropped.
Theme behavior
Section titled “Theme behavior”On the dev build, an activity follows the course theme. It receives the course colors fully resolved — every --zui-* token arrives as an opaque rgb() color, with translucent or unresolvable course values composited or resolved host-side first — plus a plain font stack and simple lengths, so the component never has to parse CSS itself.
The theme also carries a computed light or dark color scheme, taken from the course surface’s declared scheme or inferred from the resolved background’s luminance — never from the app chrome’s appearance — so an activity on a dark course renders dark. Fallback accents like --zui-ok pick the scheme variant that still reads at 4.5:1 contrast on the course background. Editing the course theme or switching a course’s scheme updates every mounted activity in place, as one deduplicated theme message per change — no reload needed; changes that arrive before the component signals readiness ride its init message instead.
Accessibility
Section titled “Accessibility”zero-UI activities are held to WCAG 2.2 AA: every pointer action has a keyboard path, every drag action has a click or select alternative, results are stated in words and not by color alone, focus rings are visible with at least 3:1 contrast, prefers-reduced-motion is honored, and feedback reaches a polite live region. The host frame is sandboxed (allow-scripts, never allow-same-origin) with no network access at runtime, so an activity cannot reach the app session or the network.
Place an activity with an agent
Section titled “Place an activity with an agent”On the dev build, an agent can place an activity without the import button: the place_zeroui_activity MCP tool (or POST /api/public/agent/courses/:id/zeroui-activity over HTTP) imports an activity export ZIP — base64 or an https link, at most 15 MB — and inserts the component with its placement on a chosen page in one idempotent step, with the same import checks and asset handling as the editor’s import. See the MCP guide for the full workflow, including building the export from a zero-UI template.
Activity kinds
Section titled “Activity kinds”The zero-UI tool ships these activity kinds: sorter, matcher, sequencer, calculator, branching scenario, hotspot (labeler), parameter simulation, software simulation and decision tree.
NXGen records a placement’s kind as one of sorter, matcher, sequencer, calculator, scenario, hotspot or custom. A manifest declaring any other kind is refused — there is no automatic fallback — so zero-UI templates beyond the six named kinds must declare kind custom in their manifest, as the newer zero-UI templates (parameter simulation, software simulation and decision tree) do. That is why they import without an NXGen change.