Skip to content

Commit

Permalink
update attention check
Browse files Browse the repository at this point in the history
  • Loading branch information
HeningWang committed Dec 13, 2024
1 parent 976f710 commit 21d6081
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 44 deletions.
Binary file modified experiments/pilot-indirectSource-V2/.DS_Store
Binary file not shown.
82 changes: 43 additions & 39 deletions experiments/pilot-indirectSource-V2/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,33 +80,36 @@
:response.sync="$magpie.measurements.attentionCheck"
:randomize="true"
:options="[
'Focuses on the ecological impact of Xeliherb farming.',
'Focuses on medical applications of Xeliherb.',
'Investigates where naturally growing Xeliherb can be found.',
'Studies how to improve the yield of cultivated Xeliherb.'
'Uncover the ecological impact of Xeliherb farming.',
'Understand the medical applications of Xeliherb.',
'Investigate where naturally growing Xeliherb can be found.',
'Find out how to improve the yield of cultivated Xeliherb.'
]"
/>
<div v-if="$magpie.measurements.attentionCheck !== undefined">
<p v-if="$magpie.measurements.attentionCheck === correctAnswers[trial.F1_informationSource]">
Correct answer!
</p>
<p v-else>
Please review your objectives again!
</p>

<button
v-if="$magpie.measurements.attentionCheck === correctAnswers[trial.F1_informationSource]"
@click="$magpie.nextScreen()">
Next
</button>

<button
v-else
@click="$magpie.nextScreen('background')">
Read again.
</button>
</div>
<button @click="$magpie.nextSlide();">Submit your answer.</button>
</Slide>
<Slide v-if="trial">
<div v-if="$magpie.measurements.attentionCheck !== undefined">
<p v-if="$magpie.measurements.attentionCheck === correctAnswers[trial.F1_informationSource]">
Nice, correct answer!
</p>
<p v-else>
Wrong anwser. Please review your objectives again!
</p>

<button
v-if="$magpie.measurements.attentionCheck === correctAnswers[trial.F1_informationSource]"
@click="$magpie.nextScreen()">
Next
</button>

<button
v-else
@click="$magpie.nextScreen('background')">
Read again.
</button>
</div>
</Slide>
</Screen>
<Screen :key="i" title="Your Preliminary Decision">
<!-- ************************************ -->
Expand All @@ -116,21 +119,21 @@
<SliderInput
left="very unlikely"
right="very likely"
:response.sync= "$magpie.measurements.probs" />
{{$magpie.measurements.probs}}%
<button v-if="$magpie.measurements.probs" @click="$magpie.saveAndNextScreen();">Submit</button>
<Record
:response.sync= "$magpie.measurements.decision1" />
{{$magpie.measurements.decision1}}%
<button v-if="$magpie.measurements.decision1" @click="$magpie.saveAndNextScreen();">Submit</button>
<Record
:data="{
trialNR: i,
itemNr: trial.itemNr,
itemName: trial.itemName,
condition: 'without_info',
condition: 'with_info',
informationSource: trial.F1_informationSource,
attentionCheckResult: $magpie.measurements.attentionCheck === correctAnswers[trial.F1_informationSource]
decision1: $magpie.measurements.decision1,
decision2: $magpie.measurements.decision2
}"
/>
</Slide>
<!-- ************************************ -->
</Screen>
<!-- ************************************ -->
<Screen :key="i" title="New Information">
Expand All @@ -143,7 +146,7 @@
</p>
<!-- Add the image -->
<img src="../pictures/infoindirect.png" alt="infoindirect image" />
<button @click="$magpie.nextSlide();">Next</button>
<button @click="$magpie.nextScreen();">Next</button>
</Slide>
<!-- ************************************ -->
<!-- ************************************ -->
Expand All @@ -153,7 +156,6 @@
The report states: <br>
<strong> A high volume of Xeliherb is associated with the presence of Ralocrop. </strong>
</p>
<!-- Add the image -->
<img src="../pictures/infodirect.png" alt="infodirect image" />
<button @click="$magpie.nextScreen();">Next</button>
</Slide>
Expand All @@ -171,17 +173,18 @@
<SliderInput
left="very unlikely"
right="very likely"
:response.sync= "$magpie.measurements.probs" />
{{$magpie.measurements.probs}}%
<button v-if="$magpie.measurements.probs" @click="$magpie.saveAndNextScreen();">Submit</button>
:response.sync= "$magpie.measurements.decision2" />
{{$magpie.measurements.decision2}}%
<button v-if="$magpie.measurements.decision2" @click="$magpie.saveAndNextScreen();">Submit</button>
<Record
:data="{
trialNR: i,
itemNr: trial.itemNr,
itemName: trial.itemName,
condition: 'with_info',
informationSource: trial.F1_informationSource,
attentionCheckResult: $magpie.measurements.attentionCheck === correctAnswers[trial.F1_informationSource]
decision1: $magpie.measurements.decision1,
decision2: $magpie.measurements.decision2
}"
/>
</Slide>
Expand All @@ -197,6 +200,7 @@

<script>
import { Screen } from 'magpie-base';
import items from '../trials/items.csv';
import _ from 'lodash';
Expand All @@ -211,8 +215,8 @@ export default {
items: _.shuffle(items).slice(0, 1),
selectedTrial: null,
correctAnswers: {
indirect:'Investigates where naturally growing Xeliherb can be found.',
direct: 'Studies how to improve the yield of cultivated Xeliherb.'
indirect:'Investigate where naturally growing Xeliherb can be found.',
direct: 'Find out how to improve the yield of cultivated Xeliherb.'
},
showFeedback: false,
feedbackMessage: '',
Expand Down
Binary file modified experiments/pilot-indirectSource-V2/trials/items.numbers
Binary file not shown.
Binary file modified experiments/pilot-indirectSource/.DS_Store
Binary file not shown.
8 changes: 3 additions & 5 deletions experiments/pilot-indirectSource/trials/items.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
itemNr;itemName;F1_informationSource;F2_listenerRole;condition
1;spaceColony;direct;scientist;direct_scientist
2;spaceColony;indirect;scientist;indirect_scientist
3;spaceColony;direct;colonist;direct_colonist
4;spaceColony;indirect;colonist;direct_colonist
itemNr;itemName;F1_informationSource
1;spaceColony;direct
2;spaceColony;indirect

0 comments on commit 21d6081

Please sign in to comment.