# Shared Cambridge learning analytics library

This folder is loaded by `cambridge/cambridge-evidence-runtime.js`; pilot pages do not each need a copy of the xAPI transport.

- `xapiwrapper.min.js` and `xAPI.js` are byte-for-byte copies from the TeacherbarModel reference package `03MathModel_HTML/scorable_newTab_timeline_countable-nouns-are-nouns-that-can-be-counted-with-pictures-replacements-by-acp.zip`. The canonical extraction/build source is `03MathModel_HTML/_source/build_xapi.py`.
- The two reference files are kept unmodified. Their SHA-256 values at adoption are recorded below.
- `cambridge-learning-analytics.js` collects bounded events from the shared recorder and the common `window.cambridgeEvidence.getEvidence()` interface used by Pattern Lab. It stores a local session report and calls the reference `window.storeState()` only when a learning-platform launch supplies tracking parameters.
- `cambridge-learning-analytics.css` styles the accessible, collapsible report.

The shared runtime also records discrete control activations and completed setting changes in Explore when a pilot exposes its selected `[data-mode="explore"]` tab. It skips mode-tab clicks and avoids adding a generic event when the pilot's own recorder logs during that control activation. Generic Explore actions stay unscored and have no objective code; a pilot must explicitly tag an event before it appears as objective evidence. Practice and Challenge answer checks continue to use each pilot's authored recorder events. The adapter does not record text entry, key-by-key input or pointer paths.

| File | SHA-256 |
|---|---|
| `xAPI.js` | `BA353B8D33F9BFE6E2A93E797E821A3989390186708C58E984812182C951E030` |
| `xapiwrapper.min.js` | `CA1955F8387CC9167B3BF3F3813A0A7ED33279F9C7282B5C122F079E51632AC5` |

The report keeps Explore unscored. A feedback code repeated across distinct items is only a possible signal for teacher review; it is not a diagnosis. No names, credentials, raw keystrokes or pointer paths are collected by this adapter.
