StoredAnswer
Defined in: store/types.ts:103
The StoredAnswer object is a data structure describing the participant's interaction with an individual component. It is the data structure used as values of the answers object of ParticipantData. The general structure for this is below:
{
"answer": {
"barChart": [
1.3
]
},
"startTime": 1711641174858,
"endTime": 1711641178836,
"windowEvents": [
...
]
}
The answer object here uses the "id" in the BaseResponse list of the component in your StudyConfig as its keys. It then contains a list of the answers given. You are also given a start and end time for the participant's interaction with the component. Lastly, a set of windowEvents is given. Below is an example of the windowEvents list.
Each item in the window event is given a time, a position an event name, and some extra information for the event (for mouse events, this is the location).
Properties​
| Property | Type | Description | Defined in |
|---|---|---|---|
answer | Record<string, JsonValue> | Object whose keys are the "id"s in the Response list of the component in the StudyConfig and whose value is the inputted value from the participant. | store/types.ts:109 |
assetIdentifier? | string | Recording/transcription key for this accepted entry. Legacy records use identifier. | store/types.ts:107 |
checkAnswer? | CheckAnswerState | Per-response grading state and Check Answer attempts for this trial. | store/types.ts:169 |
componentName | string | - | store/types.ts:111 |
correctAnswer | Answer[] | The correct answer for the component. | store/types.ts:159 |
endTime | number | Time that the user ended interaction with the component in epoch milliseconds. | store/types.ts:119 |
formOrder? | Record<string, string[]> | The order of the form elements in a base response. | store/types.ts:165 |
globalStoreEntry? | GlobalStoreValues | Active projection of the entry state for validation/analysis. Provenance remains canonical. | store/types.ts:105 |
helpButtonClickedCount | number | A counter indicating how many times participants opened the help tab during a task. Clicking help, or accessing the tab via answer feedback on an incorrect answer both are included in the counter. | store/types.ts:155 |
identifier | string | - | store/types.ts:110 |
incorrectAnswers | Record<string, { id: string; value: unknown[]; }> | Object whose keys are the "id"s in the Response list of the component in the StudyConfig and whose value is a list of incorrect inputted values from the participant. Only relevant for trials with provideFeedback enabled or custom answer-level feedback. | store/types.ts:115 |
optionOrders | Record<string, ParsedStringOption[]> | The order of question options in the component. | store/types.ts:161 |
parameters | Record<string, any> | The parameters that were passed to the component. | store/types.ts:157 |
questionOrders | Record<string, string[]> | The order of the questions in a matrix component. | store/types.ts:163 |
responseSubmitAttempted? | boolean | Whether required-response errors were revealed for this trial after a Next attempt. | store/types.ts:167 |
startTime | number | Time that the user began interacting with the component in epoch milliseconds. | store/types.ts:117 |
timedOut | boolean | A boolean value that indicates whether the participant timed out on this question. | store/types.ts:153 |
trialOrder | string | The order of the trial in the sequence. | store/types.ts:113 |
windowEvents | EventType[] | A list containing the time (in epoch milliseconds), the action (focus, input, keypress, mousedown, mouseup, mousemove, resize, scroll, visibility, gamepadconnection, gamepadbuttondown, gamepadbuttonup or gamepadaxis), and then either a coordinate pertaining to where the event took place on the screen or string related to such event. Below is an example of the windowEvents list. "windowEvents": [ [ 1711641174878, "mousedown", [ 1843, 286 ] ], [ 1711641174878, "focus", "BUTTON" ], [ 1711641174935, "mouseup", [ 1843, 286 ] ], . . . [ 1711641178706, "mousemove", [ 1868, 728 ] ] ] | store/types.ts:151 |