Skip to content

Commit

Permalink
Move develop into master (#337)
Browse files Browse the repository at this point in the history
* Fix documenation link in readme (#310)

* fix typo in exp-lookit-stimuli-preview doc string - fixes #329

* add consent_005 and consent_garden to valid template names in video-consent frame

* add consent_garden default text

* add consent_garden template option and pass in variables/parameters

* add consent_005 and consent_garden to template list in comments

* add consent_garden to template parameter options

* add missing consent_statement_text parameter to frameSchemaProperties object

* add new GARDEN-specific parameters to frameSchemaProperties object

* add doc file for consent_garden template

* add template file for consent_garden template

* fix indentation and syntax errors

* fix indentation errors

* fix string quotation errors

* fix component name

* fix issue with webcam display covering text in video-consent: remove min-height from video element

* rename consent-garden component directory with correct case

* fix multiple content/formatting errors and html rendering

* minor changes related to default text and inserting params in template

* add customization of contact section to template

* add bold to video sharing level labels

* allow HTML formatting in custom page header

* add lab as required param, fix formatting for text variables

* add lab frame parameter for consent-garden

* make duration statement optional, add bool include duration parameter

* add bold headings in garden-consent template for video-consent frame

* fix syntax error in order to show default contact header

* remove double quotes around all experiment names in consent-garden default text

---------

Co-authored-by: CJ Green <[email protected]>
  • Loading branch information
becky-gilbert and okaycj authored Sep 29, 2023
1 parent 8626048 commit d0af545
Show file tree
Hide file tree
Showing 10 changed files with 668 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ This is a small Ember application that allows both researchers to preview an exp
participate in an experiment. This is meant to be used in conjunction with the [Lookit API Django project](https://github.com/lookit/lookit-api), which contains the Experimenter and Lookit applications.
The Django applications will proxy to these Ember routes for previewing/participating in an experiment.

For installation instructions, please see the [Lookit documentation](https://lookit.readthedocs.io/en/develop/ember-app-installation.html).
For installation instructions, please see the [Lookit documentation](https://lookit.readthedocs.io/projects/frameplayer/en/latest/).
124 changes: 124 additions & 0 deletions app/components/consent-garden/doc.md

Large diffs are not rendered by default.

147 changes: 147 additions & 0 deletions app/components/consent-garden/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<div class="center-text">
<span class="exp-text-medium">
{{!-- header --}}
{{#if header}} {{exp-format header}} {{else}} {{t "consent-garden.header" experiment=experiment.name htmlSafe=true }} {{/if}}
</span>
</div>

<br>
<div class="video-consent-body">

{{!-- intro sentence --}}
<p>{{#if intro_sentence}} {{exp-format intro_sentence}} {{else}} {{t "consent-garden.intro-sentence" name=PIName institution=institution experiment=experiment.name htmlSafe=true }} {{/if}} {{ exp-format summary_statement }} </p>

{{!-- overview --}}
<h2>{{#if overview_header}} {{exp-format overview_header}} {{else}} {{t "consent-garden.overview-header" htmlSafe=true }} {{/if}}</h2>
<p>{{#if overview_content}} {{exp-format overview_content}} {{else}} {{t "consent-garden.overview-content" contact=PIContact experiment=experiment.name htmlSafe=true }} {{/if}}</p>

{{!-- study info --}}
<h2>{{#if study_info_header}} {{exp-format study_info_header}} {{else}} {{t "consent-garden.study-info-header" htmlSafe=true }} {{/if}}</h2>
<p>{{#if study_info_content}} {{exp-format study_info_content}} {{else}} {{t "consent-garden.study-info-content" description=study_info_description lab=lab institution=institution experiment=experiment.name htmlSafe=true }} {{/if}}</p>

{{!-- purpose --}}
<h2>{{#if purpose_header}} {{exp-format purpose_header}} {{else}} {{t "consent-garden.purpose-header" htmlSafe=true }} {{/if}}</h2>
<p>{{ exp-format purpose_content }}</p>

{{!-- eligibility --}}
<h2>{{#if eligibility_header}} {{exp-format eligibility_header}} {{else}} {{t "consent-garden.eligibility-header" htmlSafe=true }} {{/if}}</h2>
<p>{{ exp-format eligibility_content }}</p>

{{!-- procedures --}}
<h2>{{#if procedures_header}} {{exp-format procedures_header}} {{else}} {{t "consent-garden.procedures-header" htmlSafe=true }} {{/if}}</h2>
<p>
{{#if include_duration_in_procedures}}
{{#if duration_statment}} {{exp-format duration_statment}} {{else}} {{t "consent-garden.duration-statement" duration=experiment.duration htmlSafe=true }} {{exp-format procedures_content }} {{/if}}
{{else}}
{{exp-format procedures_content }}
{{/if}}
</p>

{{!-- payment --}}
<h2>{{#if payment_header}} {{ exp-format payment_header }} {{else}} {{t "consent-garden.payment-header" htmlSafe=true }} {{/if}}</h2>
<p>{{#if payment_content}} {{ exp-format payment_content }} {{else}} {{t "consent-garden.payment-content" htmlSafe=true }} {{/if}}</p>

{{!-- benefits --}}
<h2>{{#if benefits_header}} {{ exp-format benefits_header }} {{else}} {{t "consent-garden.benefits-header" htmlSafe=true }} {{/if}}</h2>
<p>{{ exp-format benefits_content }}</p>

{{!-- risks --}}
<h2>{{#if risk_header}} {{ exp-format risk_header }} {{else}} {{t "consent-garden.risk-header" htmlSafe=true }} {{/if}}</h2>
<p>
{{#if risk_content}}
{{ exp-format risk_content }}
{{else}}
{{t "consent-garden.risk-content-1" duration=experiment.duration experiment=experiment.name htmlSafe=true }}
{{#if risk_content_additional}} {{ exp-format risk_content_additional }} {{/if}}
{{t "consent-garden.risk-content-2" risk_content_discontinue_options=risk_content_discontinue_options htmlSafe=true }}
{{#if risk_content_breach_of_confidentiality}} {{ exp-format risk_content_breach_of_confidentiality }} {{/if}}
{{t "consent-garden.risk-content-3" htmlSafe=true }}
{{/if}}
</p>

{{!-- data collection --}}
<h2>{{#if data_collection_header}} {{ exp-format data_collection_header }} {{else}} {{t "consent-garden.data-collection-header" htmlSafe=true }} {{/if}}</h2>
<p>{{#if data_collection_content}} {{ exp-format data_collection_content }} {{else}} {{t "consent-garden.data-collection-content" institution=institution omit_video=data_collection_omit_video htmlSafe=true }} {{/if}}</p>

{{!-- data use --}}
<h2>{{#if data_use_header}} {{ exp-format data_use_header }} {{else}} {{t "consent-garden.data-use-researchers-header" htmlSafe=true }} {{/if}}</h2>
<p>{{#if data_use_content}} {{ exp-format data_use_content }} {{else}} {{t "consent-garden.data-use-researchers-content" htmlSafe=true }} {{/if}}</p>

{{!-- data access --}}
<h2>{{#if data_access_header}} {{ exp-format data_access_header }} {{else}} {{t "consent-garden.data-access-header" htmlSafe=true }} {{/if}}</h2>
<p>{{#if data_access_content}} {{ exp-format data_access_content }} {{else}} {{t "consent-garden.data-access-content" institution=institution htmlSafe=true }} {{/if}}</p>

{{!-- data management --}}
<h2>{{#if data_management_header}} {{ exp-format data_management_header }} {{else}} {{t "consent-garden.data-management-header" htmlSafe=true }} {{/if}}</h2>
<p>{{#if data_management_content}} {{ exp-format data_management_content }} {{else}} {{t "consent-garden.data-management-content" htmlSafe=true }} {{/if}}</p>

{{!-- data sharing --}}
<h2>{{#if data_sharing_header}} {{ exp-format data_sharing_header }} {{else}} {{t "consent-garden.data-sharing-header" htmlSafe=true }} {{/if}}</h2>
<p>{{#if data_sharing_content}} {{ exp-format data_sharing_content }} {{else}} {{t "consent-garden.data-sharing-content" data_sharing_learn=data_sharing_learn experiment=experiment.name htmlSafe=true }} {{/if}}</p>

{{!-- research rights and irb info --}}
<h2>{{#if research_rights_irb_header}} {{ exp-format research_rights_irb_header }} {{else}} {{t "consent-garden.research-rights-irb-header" institution=institution htmlSafe=true }} {{/if}}</h2>
<p>{{#if research_rights_irb_content}} {{ exp-format research_rights_irb_content }} {{else}} {{t "consent-garden.research-rights-irb-content" institution=institution include_irb_contact_statement=include_irb_contact_statement irb_contact=irb_contact irb_extra=irb_extra htmlSafe=true }} {{/if}}</p>

{{!-- lookit info --}}
<h2>{{#if lookit_info_header}} {{ exp-format lookit_info_header }} {{else}} {{t "consent-garden.lookit-info-header" htmlSafe=true }} {{/if}}</h2>
<p>{{#if lookit_info_content}} {{ exp-format lookit_info_content }} {{else}} {{t "consent-garden.lookit-info-content" htmlSafe=true }} {{/if}}</p>

{{!-- voluntary participation --}}
<h2>{{#if voluntary_participation_header}} {{ exp-format voluntary_participation_header }} {{else}} {{t "consent-garden.voluntary-participation-header" htmlSafe=true }} {{/if}}</h2>
<p>{{#if voluntary_participation_content}} {{ exp-format voluntary_participation_content }} {{else}} {{t "consent-garden.voluntary-participation-content" htmlSafe=true }} {{/if}}</p>

{{!-- video sharing --}}
<h2>{{#if video_sharing_header}} {{ exp-format video_sharing_header }} {{else}} {{t "consent-garden.video-sharing-header" htmlSafe=true }} {{/if}}</h2>
<p>
{{#if video_sharing_consent}} {{ exp-format video_sharing_consent }} {{else}} {{t "consent-garden.video-sharing-consent" htmlSafe=true }} {{/if}}
{{#unless data_collection_omit_video}}
<br><br>
{{#if video_sharing_study}}
{{ exp-format video_sharing_study }}
{{else}}
{{#if private_level_only}}
{{t "consent-garden.video-sharing-study-private" htmlSafe=true }}
{{else}}
{{t "consent-garden.video-sharing-study-all" htmlSafe=true }}
{{!-- databrary sharing: video sharing section --}}
{{#if include_databrary}}
<br><br>
{{#if databrary_content}} {{ exp-format databrary_content }} {{else}} {{t "consent-garden.databrary-content" htmlSafe=true }} {{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/unless}}

{{!-- additional video privacy statement --}}
{{#if additional_video_privacy_statement}}
{{exp-format additional_video_privacy_statement}}
{{/if}}
</p>

{{!-- publication --}}
<h2>{{#if publication_header}} {{ exp-format publication_header }} {{else}} {{t "consent-garden.publication-header" htmlSafe=true }} {{/if}}</h2>
<p>
{{#if publication_content}} {{ exp-format publication_content }} {{else}} {{t "consent-garden.publication-content" experiment=experiment.name htmlSafe=true }} {{/if}}
{{!-- databrary sharing: publication section --}}
{{#if include_databrary}}
<br><br>
{{#if databrary_content}} {{ exp-format databrary_content }} {{else}} {{t "consent-garden.databrary-content" htmlSafe=true }} {{/if}}
{{/if}}
</p>

{{!-- additional segments --}}
{{#if additional_segments}}
{{#each additional_segments as |segment|}}
<h2> {{exp-format segment.title}} </h2>
<p> {{exp-format segment.text}} </p>
{{/each}}
{{/if}}

{{!-- contact --}}
<h2> {{#if contact_header }} {{ exp-format contact_header }} {{else}} {{t "consent-garden.contact-header" htmlSafe=true }} {{/if}}</h2>
<p>
{{#if contact_content}} {{ exp-format contact_content }} {{else}} {{t "consent-garden.contact-content" name=PIName institution=institution contact=PIContact htmlSafe=true }} {{/if}}
</p>

</div>
2 changes: 1 addition & 1 deletion app/components/exp-lookit-stimuli-preview/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { computed } from '@ember/object';
import { videoAssetOptions, imageAssetOptions, audioAssetOptions } from '../../mixins/expand-assets';

/*
* A frame that to explain any blinding procedures to parents, and offer them the option to preview stimuli before the study. Two buttons allow the user to move forward: one goes to the next frame (if the parent wants to preview stimuli), and one skips the next frame and goes to the one after that (if the parent declins). Therefore, this frame should be followed by an {{#crossLink "Exp-video-preview"}}{{/crossLink}} frame.
* A frame that can be used to explain any blinding procedures to parents, and offer them the option to preview stimuli before the study. Two buttons allow the user to move forward: one goes to the next frame (if the parent wants to preview stimuli), and one skips the next frame and goes to the one after that (if the parent declins). Therefore, this frame should be followed by an {{#crossLink "Exp-video-preview"}}{{/crossLink}} frame.
*/

export default ExpFrameBaseComponent.extend(VideoRecord, ExpandAssets, {
Expand Down
Loading

0 comments on commit d0af545

Please sign in to comment.