Parse the QTI Results Reporting XML document: extract assessmentResult/@candidateIdentifier, testResult/outcomeVariable[@identifier='SCORE']/value, and each itemResult with its response and outcome data.
Map QTI fields to xAPI statement fields: actor (student ID mapped to an Agent with account or mbox IFI), verb (http://adlnet.gov/expapi/verbs/scored or completed), object (activity IRI matching the assessmentItem identifier).
Populate the result object: result.score.raw = SCORE value, result.score.max = MAXSCORE value, result.score.scaled = SCORE/MAXSCORE, result.completion = true if completionStatus is 'completed', result.success = true if SCORE >= passing score.
Include the assessment context in context.contextActivities.grouping using the assessment test identifier as a parent activity IRI.
POST each statement to the LRS statements endpoint (typically /xapi/statements) with Content-Type: application/json and X-Experience-API-Version: 1.0.3 header, authenticated with Basic auth or OAuth.
Verify ingestion by GET /xapi/statements?statementId=<returned_id> and confirm the stored statement matches the posted payload.
Known gotchas
QTI candidate identifiers are assessment-platform-specific user tokens; map them to your identity provider's user IRI before posting to the LRS so statements from multiple assessment platforms share a consistent actor IFI.
xAPI requires the activity IRI to be globally unique and stable; use the assessmentItem/assessmentTest GUID as a URL-safe fragment of a domain you control (e.g., https://yourdomain.org/assessments/<qti-guid>) rather than the raw QTI identifier string.
Some QTI platforms export partial completion results before the session ends; suppress intermediate results statements and only post a final statement after the session activityProgress is 'Completed'.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp