Repository navigation
v1.1.0
Added
-
andamio course import-assignment <course-id> <module-code> <file.json>— publishes a quiz assignment (a{"type": "quiz", "version": 1, …}envelope, the format the Andamio app grades client-side) as the module'sassignment.content_json, verbatim, sending only theassignmentkey. Until now this was a hand-builtcurlagainst the module-update endpoint with the JWT copied out of~/.andamio/config.json— the gap #62 closed for module creation, reopened for quizzes.The envelope is validated before any request with the union of the rules the two Andamio apps enforce (fcb-fan-engagement-app and andamio-app-v2, each
src/lib/quiz/quiz-envelope.ts, pinned by fixtures undertestdata/quiz/) — any course on the gateway is viewable in app.andamio.io, so a quiz the CLI accepts renders in both. Every violated rule is listed, and there is no bypass flag. The existing assignment's title, description, image and video URLs are preserved unless--title/--descriptionoverride them. After the update the module is re-fetched and the stored value deep-compared to the file, so the command proves the opaque-jsonbassumption on the live gateway rather than trusting it.--dry-runprints the summary (question count, pass threshold, question ids, title source) and sends nothing;--show-payloadadds the payload;--output jsonemits{course_id, module_code, module_status, assignment: {title, title_source, question_count, pass_threshold, question_ids}, verified}.Works on published modules too: db-api's aggregate update soft-skips only SLTs on a non-DRAFT module and edits assignments in any status. That statement rests on the gateway and db-api source as of this change; the live preprod check on an
ON_CHAINmodule had not been run when it was written. (#165) -
kind: verifyin the--output jsonerror envelope — a write the gateway accepted but whose read-back did not confirm the stored value: it differs from what was sent, the read-back was degraded (206), or the read-back request itself failed. Every failure after the accepted write classifies asverify; the cause stays inspectable througherrors.Unwrap. It shares exit 1 with the other kinds that are already distinguishable by name. The distinction matters because the alternatives both mislead: success would hide that the stored value is wrong,serverwould hide that the module was modified. Emitted bycourse import-assignment. Additive — no existing kind changes. (#165) -
assignment.quiz.jsonin the module directory format.course import <dir>sends it verbatim as the assignment'scontent_jsonafter validating it as a v1 quiz, preserving the existing title; a directory holding bothassignment.mdandassignment.quiz.jsonis refused before any request, and so is--createfor a module that does not exist yet (a quiz file carries no title; publish it withimport-assignment --titleafter the module exists).--dry-runreportsAssignment: quiz (N questions, threshold M)and--output jsongains an additiveassignment_quizsummary object. (#165)
Fixed
course exportno longer destroys a quiz assignment. It ran the Markdown converter over the envelope, matched no node type, and wrote an emptyassignment.md— which a latercourse importof that directory published as the assignment, replacing the quiz with an empty text document. A non-docassignment is now written verbatim toassignment.quiz.jsonand noassignment.mdis produced, so export followed by import of a quiz module is a server-side no-op. Re-exporting into the same directory with--forceremoves whichever assignment file no longer matches the module, both when the assignment is gone, and says so on stderr. (#165, #59)