mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
Merge pull request #3451 from jspsych/fix-survey-datatype
fix `response` data type to be just `ParameterType.OBJECT`
This commit is contained in:
commit
5184770fd2
10
.changeset/strange-countries-laugh.md
Normal file
10
.changeset/strange-countries-laugh.md
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
"@jspsych/plugin-survey": patch
|
||||
"@jspsych/plugin-survey-html-form": patch
|
||||
"@jspsych/plugin-survey-likert": patch
|
||||
"@jspsych/plugin-survey-multi-choice": patch
|
||||
"@jspsych/plugin-survey-multi-select": patch
|
||||
"@jspsych/plugin-survey-text": patch
|
||||
---
|
||||
|
||||
fix `response` data type to be just `ParameterType.OBJECT`
|
@ -40,20 +40,7 @@ const info = <const>{
|
||||
data: {
|
||||
/** An object containing the response for each input. The object will have a separate key (variable) for the response to each input, with each variable being named after its corresponding input element. Each response is a string containing whatever the participant answered for this particular input. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. */
|
||||
response: {
|
||||
type: ParameterType.COMPLEX,
|
||||
nested: {
|
||||
identifier: {
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
response: {
|
||||
type:
|
||||
ParameterType.STRING |
|
||||
ParameterType.INT |
|
||||
ParameterType.FLOAT |
|
||||
ParameterType.BOOL |
|
||||
ParameterType.OBJECT,
|
||||
},
|
||||
},
|
||||
type: ParameterType.OBJECT,
|
||||
},
|
||||
/** The response time in milliseconds for the participant to make a response. */
|
||||
rt: {
|
||||
|
@ -63,20 +63,7 @@ const info = <const>{
|
||||
data: {
|
||||
/** An object containing the response for each question. The object will have a separate key (variable) for each question, with the first question in the trial being recorded in `Q0`, the second in `Q1`, and so on. The responses are recorded as integers, representing the position selected on the likert scale for that question. If the `name` parameter is defined for the question, then the response object will use the value of `name` as the key for each question. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. */
|
||||
response: {
|
||||
type: ParameterType.COMPLEX,
|
||||
nested: {
|
||||
identifier: {
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
response: {
|
||||
type:
|
||||
ParameterType.STRING |
|
||||
ParameterType.INT |
|
||||
ParameterType.FLOAT |
|
||||
ParameterType.BOOL |
|
||||
ParameterType.OBJECT,
|
||||
},
|
||||
},
|
||||
type: ParameterType.OBJECT,
|
||||
},
|
||||
/** The response time in milliseconds for the participant to make a response. The time is measured from when the questions first appear on the screen until the participant's response(s) are submitted. */
|
||||
rt: {
|
||||
|
@ -80,20 +80,7 @@ const info = <const>{
|
||||
data: {
|
||||
/** An object containing the response for each question. The object will have a separate key (variable) for each question, with the first question in the trial being recorded in `Q0`, the second in `Q1`, and so on. The responses are recorded as integers, representing the position selected on the likert scale for that question. If the `name` parameter is defined for the question, then the response object will use the value of `name` as the key for each question. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. */
|
||||
response: {
|
||||
type: ParameterType.COMPLEX,
|
||||
nested: {
|
||||
identifier: {
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
response: {
|
||||
type:
|
||||
ParameterType.STRING |
|
||||
ParameterType.INT |
|
||||
ParameterType.FLOAT |
|
||||
ParameterType.BOOL |
|
||||
ParameterType.OBJECT,
|
||||
},
|
||||
},
|
||||
type: ParameterType.OBJECT,
|
||||
},
|
||||
/** The response time in milliseconds for the participant to make a response. The time is measured from when the questions first appear on the screen until the participant's response(s) are submitted. */
|
||||
rt: {
|
||||
|
@ -85,20 +85,7 @@ const info = <const>{
|
||||
data: {
|
||||
/** An object containing the response for each question. The object will have a separate key (variable) for each question, with the first question in the trial being recorded in `Q0`, the second in `Q1`, and so on. The responses are recorded as integers, representing the position selected on the likert scale for that question. If the `name` parameter is defined for the question, then the response object will use the value of `name` as the key for each question. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. */
|
||||
response: {
|
||||
type: ParameterType.COMPLEX,
|
||||
nested: {
|
||||
identifier: {
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
response: {
|
||||
type:
|
||||
ParameterType.STRING |
|
||||
ParameterType.INT |
|
||||
ParameterType.FLOAT |
|
||||
ParameterType.BOOL |
|
||||
ParameterType.OBJECT,
|
||||
},
|
||||
},
|
||||
type: ParameterType.OBJECT,
|
||||
},
|
||||
/** The response time in milliseconds for the participant to make a response. The time is measured from when the questions first appear on the screen until the participant's response(s) are submitted. */
|
||||
rt: {
|
||||
|
@ -83,20 +83,7 @@ const info = <const>{
|
||||
data: {
|
||||
/** An object containing the response for each question. The object will have a separate key (variable) for each question, with the first question in the trial being recorded in `Q0`, the second in `Q1`, and so on. The responses are recorded as integers, representing the position selected on the likert scale for that question. If the `name` parameter is defined for the question, then the response object will use the value of `name` as the key for each question. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. */
|
||||
response: {
|
||||
type: ParameterType.COMPLEX,
|
||||
nested: {
|
||||
identifier: {
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
response: {
|
||||
type:
|
||||
ParameterType.STRING |
|
||||
ParameterType.INT |
|
||||
ParameterType.FLOAT |
|
||||
ParameterType.BOOL |
|
||||
ParameterType.OBJECT,
|
||||
},
|
||||
},
|
||||
type: ParameterType.OBJECT,
|
||||
},
|
||||
/** The response time in milliseconds for the participant to make a response. The time is measured from when the questions first appear on the screen until the participant's response(s) are submitted. */
|
||||
rt: {
|
||||
|
@ -46,20 +46,7 @@ const info = <const>{
|
||||
data: {
|
||||
/** An object containing the response to each question. The object will have a separate key (identifier) for each question. If the `name` parameter is defined for the question (recommended), then the response object will use the value of `name` as the key for each question. If any questions do not have a name parameter, their keys will named automatically, with the first unnamed question recorded as `question1`, the second as `question2`, and so on. The response type will depend on the question type. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. */
|
||||
response: {
|
||||
type: ParameterType.COMPLEX,
|
||||
nested: {
|
||||
identifier: {
|
||||
type: ParameterType.STRING,
|
||||
},
|
||||
response: {
|
||||
type:
|
||||
ParameterType.STRING |
|
||||
ParameterType.INT |
|
||||
ParameterType.FLOAT |
|
||||
ParameterType.BOOL |
|
||||
ParameterType.OBJECT,
|
||||
},
|
||||
},
|
||||
type: ParameterType.OBJECT,
|
||||
},
|
||||
/** The response time in milliseconds for the participant to make a response. The time is measured from when the questions first appear on the screen until the participant's response(s) are submitted. */
|
||||
rt: {
|
||||
|
Loading…
Reference in New Issue
Block a user