Skip to content

Commit

Permalink
fix: REMOVE qualtrics from inlab timeline; feat: better separate mtur…
Browse files Browse the repository at this point in the history
…k & prolific timelines for online timelines; fix: reset triggers to 0/send 0; fix: add back in any questions? text for rules review

accidentally left in the qualtrics() ugh
  • Loading branch information
wasita mahaphanit committed Aug 7, 2020
1 parent e058793 commit 50556e0
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 30 deletions.
7 changes: 6 additions & 1 deletion src/lib/markup/photodiode.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ const pdSpotEncode = (taskCode) => {
let numBlinks = taskCode;
if (taskCode < eventCodes.open_task) numBlinks = 1;
repeat_pulse_for(blinkTime, numBlinks);
if (ipcRenderer) ipcRenderer.send("trigger", taskCode);
if (ipcRenderer) {
ipcRenderer.send("trigger", taskCode);
setTimeout(function () {
ipcRenderer.send("trigger", 0);
}, 5);
}
}
};

Expand Down
69 changes: 44 additions & 25 deletions src/timelines/main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import buildCountdown from "../trials/countdown";
import preamble from "./preamble";
import experimentStart from "../trials/experimentStart";
import qualtrics from "../trials/qualtrics";
import experimentEnd from "../trials/experimentEnd";
import taskBlock from "./taskBlock";
import showPayment from "../trials/showPayment";
import redirectToProlific from "../trials/redirectToProlific";
// import redirectToProlific from "../trials/redirectToProlific";
import userId from "../trials/userId";
import relaxReminder from "../trials/relaxReminder";
import recordNow from "../trials/recordNow";
import { ONLINE, lang } from "../config/main";
import { ONLINE, lang, MTURK } from "../config/main";
import {
practiceBlock1,
practiceBlock2,
Expand Down Expand Up @@ -43,31 +42,51 @@ const inLabTimeline = [
postPracticeInstructions(),
buildCountdown(lang.countdown.expt1, 3),
taskBlock(exptBlock1),
qualtrics(),
showPayment(5000, exptBlock1),
experimentEnd(5000),
];

const onlineTimeline = [
experimentStart(),
userId(),
preamble,
bluePracticeInstructions(),
buildCountdown(lang.countdown.practice1, 3),
taskBlock(practiceBlock1),
greenPracticeInstructions(),
buildCountdown(lang.countdown.practice2, 3),
taskBlock(practiceBlock2),
realPracticeInstructions(),
buildCountdown(lang.countdown.practice3, 3),
taskBlock(practiceBlock3),
quizTimeline(practiceBlock3),
postPracticeInstructions(),
buildCountdown(lang.countdown.expt1, 3),
taskBlock(exptBlock1),
showPayment(5000, exptBlock1),
buildCountdown(lang.countdown.redirect_to_prolific, 5),
redirectToProlific(lang.prolific.completion_code_url, 250),
];
const onlineTimeline = MTURK
? [
experimentStart(),
userId(),
preamble,
bluePracticeInstructions(),
buildCountdown(lang.countdown.practice1, 3),
taskBlock(practiceBlock1),
greenPracticeInstructions(),
buildCountdown(lang.countdown.practice2, 3),
taskBlock(practiceBlock2),
realPracticeInstructions(),
buildCountdown(lang.countdown.practice3, 3),
taskBlock(practiceBlock3),
quizTimeline(practiceBlock3),
postPracticeInstructions(),
buildCountdown(lang.countdown.expt1, 3),
taskBlock(exptBlock1),
showPayment(5000, exptBlock1),
experimentEnd(2000),
]
: // PROLIFIC VERSION OF THE TASK BELOW:
[
experimentStart(),
userId(),
preamble,
bluePracticeInstructions(),
buildCountdown(lang.countdown.practice1, 3),
taskBlock(practiceBlock1),
greenPracticeInstructions(),
buildCountdown(lang.countdown.practice2, 3),
taskBlock(practiceBlock2),
realPracticeInstructions(),
buildCountdown(lang.countdown.practice3, 3),
taskBlock(practiceBlock3),
quizTimeline(practiceBlock3),
postPracticeInstructions(),
buildCountdown(lang.countdown.expt1, 3),
taskBlock(exptBlock1),
showPayment(5000, exptBlock1),
buildCountdown(lang.countdown.redirect_to_prolific, 5),
];

export const tl = ONLINE ? onlineTimeline : inLabTimeline;
8 changes: 4 additions & 4 deletions src/trials/quizTrials.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const quizRules = [
`${lang.quiz.rules.green_vary_bonus}`,
`${lang.quiz.rules.twenty_five_secs_green}`,
`${lang.quiz.rules.bonus_green_spike}`,
// `${lang.quiz.any_questions}`,
`${lang.quiz.any_questions}`,
`${lang.quiz.retake}`,
];

Expand Down Expand Up @@ -131,9 +131,9 @@ const reshowRules = (blockSettings) => {
"<br></br>" +
quizRules[6] +
"<br></br>" +
quizRules[7],
// "<br></br>" +
// quizRules[8],
quizRules[7] +
"<br></br>" +
quizRules[8],
];

return {
Expand Down

0 comments on commit 50556e0

Please sign in to comment.