Skip to content

Commit

Permalink
change answers to response in cloze plugin jspsych#638
Browse files Browse the repository at this point in the history
  • Loading branch information
becky-gilbert committed Feb 17, 2021
1 parent c812e8d commit b85ced4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/plugins/jspsych-cloze.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ In addition to the [parameters available in all plugins](/overview/plugins#param

In addition to the [default data collected by all plugins](/overview/plugins#data-collected-by-all-plugins), this plugin collects the following data for each trial.

| Name | Type | Value |
| ------- | ---------------- | --------------------------- |
| answers | array of strings | Answers the partcipant gave |
| Name | Type | Value |
| -------- | ---------------- | --------------------------- |
| response | array of strings | Answers the partcipant gave |

## Examples

Expand Down
2 changes: 1 addition & 1 deletion plugins/jspsych-cloze.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jsPsych.plugins['cloze'] = (function () {
if (!trial.check_answers || (trial.check_answers && answers_correct))
{
var trial_data = {
'answers' : answers
response: answers
};

display_element.innerHTML = '';
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/plugin-cloze.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('cloze', function(){
document.getElementById('input0').value = 'cloze1';
document.getElementById('input1').value = 'cloze2';
utils.clickTarget(document.querySelector('#finish_cloze_button'));
var data = jsPsych.data.get().values()[0].answers;
var data = jsPsych.data.get().values()[0].response;
expect(data.length).toBe(2);
expect(data[0]).toBe('cloze1');
expect(data[1]).toBe('cloze2');
Expand Down

0 comments on commit b85ced4

Please sign in to comment.