Skip to content

Commit

Permalink
Merge pull request #270 from lookit/release/v3.1.0
Browse files Browse the repository at this point in the history
Release/v3.1.0
  • Loading branch information
Kim Scott committed Jun 17, 2021
2 parents f871c02 + 884b9c6 commit bbe0640
Show file tree
Hide file tree
Showing 33 changed files with 955 additions and 120 deletions.
2 changes: 1 addition & 1 deletion app/components/consent-template001/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@

<p class="exp-text-medium"> Researcher contact information </p>
<p> This study is run by {{PIName}} at {{institution}}. If you or your child have any questions or concerns about this study, or in the very unlikely event of a research-related injury, please contact {{PIContact}}. </p>
<p>If you or your child have any questions or concerns about the Lookit platform, please contact Kim Scott at kimscott@mit.edu or 617 324 4859.</p>
<p>If you or your child have any questions or concerns about the Lookit platform, please contact Lookit staff at lookit@mit.edu or 617 324 4859.</p>

</div>
4 changes: 2 additions & 2 deletions app/components/consent-template003/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<p> {{payment}} </p>

<p class="exp-text-medium"> Data collection and webcam recording </p>
<p> During the session, you and your child will be recorded via your computer's webcam and microphone. Video recordings and other data you enter are sent securely to the Lookit platform and stored indefinitely. At the end of the session, you will be prompted to choose a privacy level for your webcam recordings. You will have the option to withdraw your video data at this point. You can view your past recordings on Lookit under "Studies" -> "Your past studies" at any time.</p>
<p> During the session, you and your child will be recorded via your computer's webcam and microphone. Video recordings and other data you enter are sent securely to the Lookit platform and stored indefinitely. At the end of the session, you will be prompted to choose a privacy level for your webcam recordings. You will have the option to withdraw your video data at this point. You can view your past recordings on Lookit at any time.</p>
<p>Data is stored securely on Lookit servers and by researchers. However, there is always a small risk that data transmitted over the internet may be intercepted or that the security of stored data may be compromised.</p>
<p>No video clips will be published or shared unless you allow this when selecting a privacy level. If we do not receive a consent recording (the video you'll make to the right) for this session and cannot verify that you agreed to participate, no other video from your session will be viewed.</p>

Expand Down Expand Up @@ -60,6 +60,6 @@

<p class="exp-text-medium"> Researcher contact information </p>
<p> This study is run by {{PIName}} at {{institution}}. If you or your child have any questions or concerns about this study, or in the very unlikely event of a research-related injury, please contact {{PIContact}}. </p>
<p>If you or your child have any questions or concerns about the Lookit platform, please contact Kim Scott at kimscott@mit.edu or 617 324 4859.</p>
<p>If you or your child have any questions or concerns about the Lookit platform, please contact Lookit staff at lookit@mit.edu or 617 324 4859.</p>

</div>
4 changes: 2 additions & 2 deletions app/components/consent-template004/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<p> {{payment}} </p>

<p class="exp-text-medium"> Data collection and webcam recording </p>
<p>During the session, you and your child will be recorded via your computer's webcam and microphone. At the end of the session, you will be prompted to choose a privacy level for your webcam recordings. You will have the option to withdraw your video data at this point. Video recordings and other data you enter are sent securely to the Lookit platform and stored indefinitely. You can view your past recordings on Lookit under "Studies" -> "Your past studies" at any time.</p>
<p>During the session, you and your child will be recorded via your computer's webcam and microphone. At the end of the session, you will be prompted to choose a privacy level for your webcam recordings. You will have the option to withdraw your video data at this point. Video recordings and other data you enter are sent securely to the Lookit platform and stored indefinitely. You can view your past recordings on Lookit at any time.</p>
<p>Data is stored securely on Lookit servers and by researchers. However, there is always a small risk that data transmitted over the internet may be intercepted or that the security of stored data may be compromised.</p>
<p>No video clips will be published or shared unless you allow this when selecting a privacy level. If we do not receive a consent recording (the video you'll make to the right) for this session and cannot verify that you agreed to participate, no other video from your session will be viewed.</p>

Expand Down Expand Up @@ -61,6 +61,6 @@

<p class="exp-text-medium"> Researcher contact information </p>
<p> This study is run by {{PIName}} at {{institution}}. If you or your child have any questions or concerns about this study, or in the very unlikely event of a research-related injury, please contact {{PIContact}}. </p>
<p>If you or your child have any questions or concerns about the Lookit platform, please contact Kim Scott at kimscott@mit.edu or 617 324 4859.</p>
<p>If you or your child have any questions or concerns about the Lookit platform, please contact Lookit staff at lookit@mit.edu or 617 324 4859.</p>

</div>
28 changes: 17 additions & 11 deletions app/components/consent-template005/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,23 @@
{{t "consent-template-5.video-privacy-consent" }}
</p>

<p>
{{t "consent-template-5.video-privacy-overview" }}:
<ul>
<li>"{{t "consent-template-5.video-privacy-Private" }}": {{t "consent-template-5.video-privacy-private-description" }}</li>
<li>"{{t "consent-template-5.video-privacy-Scientific" }}": {{t "consent-template-5.video-privacy-scientific-description" }}
</li>
<li>"{{t "consent-template-5.video-privacy-Publicity" }}": {{t "consent-template-5.video-privacy-publicity-description" }}
</li>
</ul>
{{t "consent-template-5.video-privacy-withdraw" }}
</p>
{{#if private_level_only}}
<p>
{{t "consent-template-5.video-privacy-private-description" }} {{t "consent-template-5.video-privacy-withdraw-private-only" }}
</p>
{{else}}
<p>
{{t "consent-template-5.video-privacy-overview" }}:
<ul>
<li>"{{t "consent-template-5.video-privacy-Private" }}": {{t "consent-template-5.video-privacy-private-description" }}</li>
<li>"{{t "consent-template-5.video-privacy-Scientific" }}": {{t "consent-template-5.video-privacy-scientific-description" }}
</li>
<li>"{{t "consent-template-5.video-privacy-Publicity" }}": {{t "consent-template-5.video-privacy-publicity-description" }}
</li>
</ul>
{{t "consent-template-5.video-privacy-withdraw" }}
</p>
{{/if}}

{{#if include_databrary}}
<p>
Expand Down
4 changes: 3 additions & 1 deletion app/components/exp-frame-base/doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ language [String]
The value of the "language" field will persist across frames once set, so you can set it once at the start of your
study to set the language for all frames.

Current options are 'en-US' (English, US) and 'nl' (Dutch). To add another language option, please contact Lookit
Current options are 'en-US' (English, US), 'nl' (Dutch), and 'it' (Italian).

To add another language option, please contact Lookit
staff. You will need to make a copy of the `English translation file <https://github.com/lookit/ember-lookit-frameplayer/blob/develop/translations/en-us.yaml>`__ and translate the text after the colon
on each line, leaving everything else the same. You can see an example `here <https://github.com/lookit/ember-lookit-frameplayer/blob/develop/translations/nl.yaml>`__. There are three special cases:

Expand Down
13 changes: 13 additions & 0 deletions app/components/exp-lookit-exit-survey/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,20 @@ export default ExpFrameBaseComponent.extend(Validations, {
default: '',
description: 'Additional text to display under "Use of video clips and images:", before listing options'
},
privateLevelOnly: {
type: 'boolean',
default: false,
description: 'Whether to restrict privacy level "choices" to the "private" option'
},
showDatabraryOptions: {
type: 'boolean',
default: true,
description: 'Whether to show the Databrary sharing option question - please only disable if required by IRB'
},
includeWithdrawalExample: {
type: 'boolean',
default: true,
description: 'Whether to include the parenthetical example of why you might withdraw video data - please only disable if required by IRB'
}
},
frameSchemaRequired: ['debriefing'],
Expand Down Expand Up @@ -178,5 +188,8 @@ export default ExpFrameBaseComponent.extend(Validations, {
if (!this.get('showDatabraryOptions')) {
this.set('databraryShare', 'NA');
}
if (this.get('privateLevelOnly')) {
this.set('useOfMedia', 'private');
}
}
});
6 changes: 6 additions & 0 deletions app/components/exp-lookit-exit-survey/doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ showShareButton [Boolean | ``true``]
showDatabraryOptions [Boolean | ``true``]
Whether to show the question about Databrary sharing. Please do not change this unless your IRB requires it and you have checked with Lookit staff - in general all studies should ask for permission to share on Databrary, even if you do not have active plans to do so or even an account on Databrary.

includeWithdrawalExample [Boolean | ``true``]
Whether to include the parenthetical example of why you might withdraw video data. Please only disable if required by your IRB and you have checked with Lookit staff.

privateLevelOnly [Boolean | ``false``]
Whether to offer only the "Private" video privacy level option under "Use of video clips and images." Only use this if your IRB has a hard restriction against offering participants the opportunity to share their videos more broadly.

additionalVideoPrivacyText [String]
Optional additional text to display under the header "Use of video clips and images", above the options. This may
be used, for example, if you have separately asked for permission to use the videos as stimuli for other parents and want
Expand Down
38 changes: 20 additions & 18 deletions app/components/exp-lookit-exit-survey/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,24 @@
{{/if}}
</label>
</div>
<div class="radio">
<label>
<span class="radio-holder">
{{radio-button value="scientific" checked=useOfMedia name="useOfMedia"}}
</span>
{{ t "exp-lookit-exit-survey.scientific-option" htmlSafe=true}}
</label>
</div>
<div class="radio">
<label>
<span class="radio-holder">
{{radio-button value="public" checked=useOfMedia name="useOfMedia"}}
</span>
{{ t "exp-lookit-exit-survey.publicity-option" htmlSafe=true }}
</label>
</div>
{{#unless privateLevelOnly}}
<div class="radio">
<label>
<span class="radio-holder">
{{radio-button value="scientific" checked=useOfMedia name="useOfMedia"}}
</span>
{{ t "exp-lookit-exit-survey.scientific-option" htmlSafe=true}}
</label>
</div>
<div class="radio">
<label>
<span class="radio-holder">
{{radio-button value="public" checked=useOfMedia name="useOfMedia"}}
</span>
{{ t "exp-lookit-exit-survey.publicity-option" htmlSafe=true }}
</label>
</div>
{{/unless}}
{{#if showValidation}}
<p class="text text-danger">
{{validations.attrs.useOfMedia.messages}}
Expand All @@ -102,12 +104,12 @@
<label>
{{input type="checkbox" checked=withdrawal name="withdrawal"}}
<span class="extra-info">
{{ t "exp-lookit-exit-survey.withdrawal-details" name=experiment.name contact=experiment.contactInfo }}
{{ t "exp-lookit-exit-survey.withdrawal-details" name=experiment.name contact=experiment.contactInfo include_example=includeWithdrawalExample}}
</span>
</label>
<hr>
<div class="form-group">
<label>{{ t "exp-lookit-exit-survey.feedback-label" }}:</label><br>
<label>{{ t "exp-lookit-exit-survey.feedback-label" }}</label><br>
{{textarea class="input-text" value=feedback name="feedback" rows=3 cols=40}}
</div>
<hr>
Expand Down
5 changes: 5 additions & 0 deletions app/components/exp-lookit-images-audio/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export default ExpFrameBaseComponent.extend(VideoRecord, PauseUnpause, ExpandAss
default: true,
description: 'Whether to show a replay button (used only if showing Next button)'
},
showCursor: {
type: 'boolean',
default: true,
description: 'Whether to show the mouse cursor'
},
maximizeDisplay: {
type: 'boolean',
default: false,
Expand Down
8 changes: 7 additions & 1 deletion app/components/exp-lookit-images-audio/doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ The examples below show a variety of usages.
"doRecording": true,
"durationSeconds": 8,
"maximizeDisplay": true,
"showCursor": false,
"pageColor": "black",
"backgroundColor": "black"
Expand Down Expand Up @@ -186,7 +187,8 @@ The examples below show a variety of usages.
"text": "Some explanatory text for parents",
"title": "For parents"
},
"showProgressBar": true
"showProgressBar": true,
"showCursor": false
}
4. Image plus audio, with 'next' button to move on
Expand Down Expand Up @@ -511,6 +513,10 @@ pageColor [String | ``'white'``]
for acceptable syntax: can use color names ('blue', 'red', 'green', etc.), or
rgb hex values (e.g. '#800080' - include the '#')

showCursor [Boolean | ``true``]
Whether to show the mouse cursor during this frame. By default it is shown to allow clicking on buttons or images,
but it can be hidden for looking studies where it might be a distraction.

choiceAllowed [Boolean | ``false``]
Whether the user may click on images to select them.

Expand Down
2 changes: 1 addition & 1 deletion app/components/exp-lookit-images-audio/template.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{! template-lint-disable no-invalid-interactive}}

<div class="exp-lookit-image-audio">
<div class="exp-lookit-image-audio {{if showCursor "cursor-display"}}">

<div class="row recorder-container video-recorder-hidden">
<div id="recorder" class="col-xs-12">
Expand Down
120 changes: 120 additions & 0 deletions app/components/exp-lookit-survey-consent/component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import layout from './template';
import ExpFrameBaseComponent from '../exp-frame-base/component';
import Ember from 'ember';

let {
$
} = Ember;


/*
* A frame to display text-only instructions, etc. to the user.
*/

export default ExpFrameBaseComponent.extend({
type: 'exp-lookit-survey-consent',
layout: layout,
frameType: 'CONSENT',

frameSchemaProperties: {
showPreviousButton: {
type: 'boolean',
default: true
},
multipleChoiceValidationText: {
type: 'string',
default: '* You must answer this question to participate'
},
checkboxValidationText: {
type: 'string',
default: '* You must agree to this item to participate'
},
formValidationText: {
type: 'string',
default: 'Some items were missing - please review your answers. If you do not want to participate, you can use the Back button on your browser or close this window.'
},
items: {
type: 'array',
items: {
type: 'object',
kind: {
oneOf: ['multiple-choice', 'checkbox-item', 'text-block'],
type: 'string'
}
},
default: []
}
},

meta: {
data: {
type: 'object',
properties: {
items: {
type: 'array'
}
}
}
},

showValidation: false,

validate() {
let _this = this;
let formValid = true;
this.get('items').forEach((item) => {
if (['checkbox-item', 'multiple-choice'].includes(item.kind)) {
let answer = _this.get(`answer_${item.label}`);
Ember.set(item, 'showValidation', !answer);
if (!answer) {
formValid = false;
}
}
});
this.set('showValidation', !formValid);
return formValid;
},

actions: {
finish() {
let formValid = this.validate();
if (formValid) {
this.send('next');
} else {
$('div.exp-lookit-survey-form').scrollTop(0);
}
}
},

didInsertElement() {
let used_labels = [];

this.get('items').forEach((item, index) => {
if (['checkbox-item', 'multiple-choice'].includes(item.kind)) { // Only process labels for questions, not text
// Turn the question label into a string, strip out any non-alphanumeric characters, make sure it's unique
let proposed_label = String(item.label ? item.label : index);
proposed_label = proposed_label.replace(/[^\w]+/g, "");
let repeat = 1;
while (used_labels.includes(proposed_label)) {
proposed_label = `${proposed_label}_${repeat}`;
repeat += 1;
}
Ember.set(item, 'label', proposed_label); // Update label in template
used_labels.push(proposed_label);
switch (item.kind) {
case 'checkbox-item':
this.meta.data.properties[`answer_${proposed_label}`] = {type: 'boolean'};
this.set(`answer_${proposed_label}`, false);
Ember.set(item, 'validationText', this.get('checkboxValidationText'));
break;
case 'multiple-choice':
this.meta.data.properties[`answer_${proposed_label}`] = {type: 'string'};
this.set(`answer_${proposed_label}`, '');
Ember.set(item, 'validationText', this.get('multipleChoiceValidationText'));
break;
}
}
});
this._super(...arguments);
}
});

0 comments on commit bbe0640

Please sign in to comment.