Puzzles instead of boxes

An exercise the learner solves, not a field the learner fills in.

A blank text box asks the learner to do the work and gives nothing back. An Edu/Puzzle asks something with a right answer, tells the learner at once whether they have it, and explains why once they do. A ring with a padlock fills as rounds are solved and opens at the end, followed by confetti and one to three stars (fewer mistakes, more stars; every finish earns one).

The three kinds

kind The learner… A round carries
choice taps the fitting answer prompt, options (or the puzzle's shared options), answer (0-based)
order taps the pieces into the right order items, authored in the RIGHT order — the page shuffles them
spot taps every wrong line, then Check lines, wrong (0-based indices)

Every round may add explain (shown once it is solved) and hint. A round that cannot be solved as authored — an answer outside the options, an order with fewer than two items, a spot round with no wrong line — is never shown, so a typo cannot leave a learner stuck.

An instance

{
  "id": "WhichRulePuzzle",
  "nodeType": "Edu/Puzzle",
  "name": "Storm detective",
  "content": {
    "$type": "PuzzleContent",
    "title": "Storm detective",
    "kind": "choice",
    "accent": "#7c3aed",
    "options": ["Lots!", "No «that's stupid»", "Wild is welcome", "Yes, and…"],
    "rounds": [
      { "prompt": "Anna says: that's a silly idea.", "answer": 1, "explain": "Judging comes later." }
    ],
    "successTitle": "🎉 Case closed!",
    "successText": "You know the four storm rules."
  }
}

Embed it on the exercise page with @@("../WhichRulePuzzle/area/Play") (relative, so an installed copy embeds its own).

What is stored, and where

Nothing. The rounds are authored once, in the course; the learner's progress is per-viewer layout-area state, so the course's own copy stays read-only and every learner still plays it. A puzzle is practice, not an assessment — use Edu/Quiz where the answers must survive a reload and count toward completion.

Language and colour

The page's chrome — "3 of 6 solved", "Right!", "Check", "Play again" — speaks the viewer's language, falling back to the course root's declared language: the same seam the lesson and the quiz use. The authored rounds stay in the language they were written in. accent sets the ring, the card border and the picked pieces; unset, it is the Edu blue. codeLines: true shows a spot round's lines as code: monospace, with indentation kept.

Why a platform type

A course could compile its own puzzle type, and the first one did. But every course-local type is compiled again on each install and turns off the install-copy tests for that course. As Edu/Puzzle it is compiled once with the plugin, and a course only ships instances.