diff --git a/index.html b/index.html index bc495ab..32afcf1 100644 --- a/index.html +++ b/index.html @@ -82,7 +82,7 @@ function init(){ //fdbktl(1); - showInstructions('ID_wf'); + showInstructions('OD_wf'); //trials(fullTL); } diff --git a/static/css/task.css b/static/css/task.css index 967ff72..bc8a89a 100644 --- a/static/css/task.css +++ b/static/css/task.css @@ -3,12 +3,12 @@ .box.open {background: url('../images/box_open_sm.gif')} .box.closed {background: url('../images/box_closed_sm.gif')} /*x over devalued*/ -.disabled::after { - content: url('../images/devalue.png'); +.disabled::before { + content: url('../images/X.png'); position: absolute; - opacity: 50%; - margin-left: -100px; - margin-top: -50px; + opacity: 90%; + margin-left: -70px; + margin-top: -77px; } .feedback {text-align: center;} /* unnecessary */ .feedback>.score { diff --git a/static/images/X.png b/static/images/X.png new file mode 100644 index 0000000..e3531cb Binary files /dev/null and b/static/images/X.png differ diff --git a/static/images/blueberry.gif b/static/images/blueberry.gif new file mode 100644 index 0000000..38691e9 Binary files /dev/null and b/static/images/blueberry.gif differ diff --git a/static/images/olive.gif b/static/images/olive.gif new file mode 100644 index 0000000..59def63 Binary files /dev/null and b/static/images/olive.gif differ diff --git a/static/js/instructions.js b/static/js/instructions.js index 56dfbe0..c0de1b4 100644 --- a/static/js/instructions.js +++ b/static/js/instructions.js @@ -44,7 +44,7 @@ const INSTRUCTIONS_DATA = { inst_o.render(false), // http://xahlee.info/comp/unicode_arrows.html "All boxes open from both the left and right.
You can pick which way to open the box using the left (🠘) or right (🠚) arrow keys
" + IDexample(null,null), - "
But the boxes have a trick to hide what's inside.
If you pick the wrong side, the box will appear empty and have no points.
" + IDexample(null, inst_b.feedback(0)), + "
But the boxes have a trick to hide what's inside.
If you pick the wrong side, the inside will appear empty and have no points.
" + IDexample(null, inst_b.feedback(0)), "You will get points for picking the correct side to open."+ // "
You will get more points the faster you pick the correct side." + "
Boxes labeled with the same fruit on the outside always open from the same side.", @@ -53,17 +53,23 @@ const INSTRUCTIONS_DATA = { "Learn how to open all the boxes and get the most points!
Remember what fruits are inside the boxes too.
Ready to play!?
We'll start when you hit next." ], "OD_wf": [ - "You opened all the boxes we have! But we have too many of some of the inside fruits. You can get now get points by picking only the inside fruits without an X over them.
Pick a fruit by using the same side that opened the box" + "You opened all the boxes we have! But we have too many of some of the inside fruits.
You can get now get points by picking only the inside fruits without an X over them.
Pick a fruit by using the same side that opened the box the fruit was inside of", + "We'll tally up your score at the end. You wont know if you're right or wrong until then
When you're ready to start, click next.", //
Go faster for more points." ], "SOA_wf": [ "We are getting new box shipments from all over, but some of the fruits on the inside have gone bad.", "For each shipment, we will get a chart showing good and bad fruits.
Only open boxes with unspoiled fruits in them. Don't pick those with an X on them.", - "You will still get points for opening boxes with good fruits inside
But don't even try to open a box with a spoiled fruit. If you correctly open a box with spoiled fruit inside, you'll lose points!", - "Just like before, the faster you get unspoiled inside fruits, the more points you get" ], + "You will still get points for opening boxes with good fruits inside
But do not even try to open a box with a spoiled fruit. If you correctly open a box with spoiled fruit inside, you'll lose points!", + "You'll have 5 seconds to memorize the good/bad chart for each shipment.
Then, you will only have a second to open the box or let it pass.", + "You'll see how well you did at the end of each shipment, but you wont know if you're right or wrong until then.
When you're ready, click next.", + //"Just like before, the faster you get unspoiled inside fruits, the more points you get" + ], "DD_wf": [ "Someone tried to intercept our shipments of secret boxes, but didn't know how to open them.", "For each shipment, we have a chart of what boxes were damaged.", "You will still get points for opening boxes with good fruits inside
But don't even try to open a damaged box. If you open a damanged box correctly, you'll lose points!", - "Just like before, the faster you correctly open undamaged boxes, the more points you get" ] + "You'll see how well you did at the end of each shipment, but you wont know if you're right or wrong until then.
When you're ready, click next.", + //"Just like before, the faster you correctly open undamaged boxes, the more points you get" + ] } diff --git a/static/js/utils.js b/static/js/utils.js index 6e0f552..b07fd08 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -225,7 +225,7 @@ function mkBoxTrial(b, soa_block, block) { type: 'html-keyboard-response', stimulus: b.S.render(false), choices: accept_keys, - //post_trial_gap: ITI, + post_trial_gap: ITI, trial_duration: dur, prompt: "

left or right

", on_finish: function (data) { @@ -252,7 +252,8 @@ function mkIDFbk() { stimulus: function (trial) { // setup win vs nowin feedback color and message var prev = jsPsych.data.get().last().values()[0]; - return (FRTS[prev.outcome].feedback(prev.score)); + var frt = FRTS[prev.outcome]; + return (frt.feedback(prev.score)); }, //update //on_load: save_data(), diff --git a/static/js/utils.ts b/static/js/utils.ts index d8dd1ad..85802bc 100644 --- a/static/js/utils.ts +++ b/static/js/utils.ts @@ -1,5 +1,5 @@ declare var jsPsych: any; -declare var FRTS: {[key: string]: Fruit; }[]; // e.g. 'apple' => Fruit. see fruits() +declare var FRTS: {[key: string]: Fruit; }; // e.g. 'apple' => Fruit. see fruits() declare var uniqueId: any; declare var psiturk: any; //declare var $: any; //jquery @@ -241,7 +241,7 @@ function mkBoxTrial(b: Box, soa_block: number, block: string): PsychEvent { type: 'html-keyboard-response', stimulus: b.S.render(false), choices: accept_keys, - //post_trial_gap: ITI, + post_trial_gap: ITI, // 20200526 - ITI helpful for knowning when fruit changed trial_duration: dur, prompt: "

left or right

", on_finish: function(data) { @@ -268,7 +268,8 @@ function mkIDFbk(): PsychEvent { stimulus: function(trial) { // setup win vs nowin feedback color and message let prev = jsPsych.data.get().last().values()[0]; - return (FRTS[prev.outcome].feedback(prev.score)) + let frt : Fruit = FRTS[prev.outcome] + return (frt.feedback(prev.score)) }, //update //on_load: save_data(),