AlmondTill/G3N API

TrainingAttempt

object type

A TrainingAttempt (🎓 — THE TRAINING PROGRAM, THE WIRE): ONE sitting of a course's test by ONE person — ALWAYS the caller who started it (nobody starts one for someone else). At start the platform draws 10 ACTIVE questions of the course (every active question when fewer; below 3 the start refuses CONFLICT/TRAINING_TOO_FEW_QUESTIONS) and stores EXACTLY that draw (questionIds); passMark is copied from the strictest requirement binding the person for the course, else the default; curriculumVersion is the play's content hash at the sitting. At submit the answers are GRADED SERVER-SIDE against the STORED draw (a later bank edit never re-grades it) — score 0..100, passed = score >= passMark; a PASS mints the TrainingCertificate in the SAME transaction (certificateId). open (live) → submitted (terminal, kept) by the subject · open → doomed (terminal) by manage authority. ONE open sitting per (person, course) — a second start refuses CONFLICT/TRAINING_ATTEMPT_OPEN; at most 5 sittings per (person, course) per UTC day (CONFLICT/TRAINING_CAP). The by-id read answers the subject or the training-manage right; the listing is the manage right's. NOT searchable.

Fields

FieldTypeNotes
idID ID!The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it.
sysIdString String!The group-scoped human-facing system id (TT-…).
typeString String!The kind of record — always TrainingAttempt here.
captionString String!The record’s display name — what people see it called.
statusString String!The FSM state: open | submitted | doomed.
parentIdID ID!The parent org group; for a TrainingAttempt parentId === rootId.
rootIdID ID!The org-group family root.
createdAtString String!When the record was created, as a UTC timestamp.
updatedAtString String!When the record last changed, as a UTC timestamp.
revisionNumInt Int!How many times this record has been edited; the first save is 0.
revisionID ID!The OCC revision token — supply it on every mutation of this record; rotates on every write.
refCaptionsRefCaption [RefCaption!]!The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption.
userIdID ID!The subject — the User who started the sitting; ALWAYS the caller. IMMUTABLE at birth.
orgIdID ID!The organization the sitting was started in (the session’s acting org) — the progress record’s second coordinate. IMMUTABLE at birth.
courseKeyString String!The course — a live play key. IMMUTABLE at birth.
questionIdsID [ID!]!THE DRAW — 3..10 question ids drawn from the ACTIVE bank at start, in the order asked; the grade is taken against exactly these. IMMUTABLE at birth.
answersInt [Int!]One option index per drawn question, in the draw order — set ONCE at submit; null while open or doomed.
scoreIntThe grade 0..100 (rounded) — set at submit; null while open or doomed.
passedBooleanscore >= passMark — set at submit; null while open or doomed.
passMarkInt Int!Copied at start from the strictest requirement binding the person for the course, else the default 80. IMMUTABLE at birth.
startedAtString String!The start instant (UTC ISO-8601). IMMUTABLE at birth.
submittedAtStringThe submit instant (UTC ISO-8601); null while open or doomed.
curriculumVersionString String!The play’s content hash at the sitting (16 hex — sha-256 over its title, line and the steps’ words); ’s refresh rule compares it. IMMUTABLE at birth.
certificateIdIDThe certificate a PASSING submit minted in the same transaction; null on a fail, while open, or when doomed.

Used by