From beb70ac11b76c01090a3d894526d9654d9bca7c9 Mon Sep 17 00:00:00 2001 From: Nicholas Lee Date: Thu, 20 Jun 2024 11:57:34 -0400 Subject: [PATCH 1/2] feat: add initial sdmt task to scripts --- populate-scripts/insert-db.sql | 6 ++--- populate-scripts/update/93-sdmt.sql | 38 +++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 populate-scripts/update/93-sdmt.sql diff --git a/populate-scripts/insert-db.sql b/populate-scripts/insert-db.sql index 336a84f..dc0e6bc 100644 --- a/populate-scripts/insert-db.sql +++ b/populate-scripts/insert-db.sql @@ -13,9 +13,9 @@ INSERT INTO tasks (id, from_platform, task_type, name, description, external_url ( NULL, "PSHARPLAB", - "QUESTIONNAIRE", - "reward_mood", - "Reward Mood Display Slide", + "EXPERIMENTAL", + "SDMT", + "Symbol Digit Modalities Task", "", '{}' ); \ No newline at end of file diff --git a/populate-scripts/update/93-sdmt.sql b/populate-scripts/update/93-sdmt.sql new file mode 100644 index 0000000..668a280 --- /dev/null +++ b/populate-scripts/update/93-sdmt.sql @@ -0,0 +1,38 @@ + +-- Iowa Gambling Task +UPDATE tasks SET + from_platform = "PSHARPLAB", + task_type = "EXPERIMENTAL", + name = "SDMT", + description = "Symbol Digit Modalities Task. The participant needs to use a key that maps images to numbers. They must look at a grid of images, and input the associated numbers", + config = '{ + "taskConfig": {}, + "metadata": [ + { + "componentName": "SDMTCOMPONENT", + "componentConfig": { + "isPractice": true, + "numRows": 1, + "numnCols": 9, + "stimuliConfig": { + "type": "generated", + "stimuli": null + } + } + }, + { + "componentName": "SDMTCOMPONENT", + "componentConfig": { + "isPractice": true, + "maxResponseTime": 120000, + "numRows": 9, + "numnCols": 16, + "stimuliConfig": { + "type": "generated", + "stimuli": null + } + } + } + ] + }' +WHERE id = 93; \ No newline at end of file From d451b8bfb2a45b4294ea7c1a92bfd5ae9db0a196 Mon Sep 17 00:00:00 2001 From: Nicholas Lee Date: Thu, 20 Jun 2024 16:15:39 -0400 Subject: [PATCH 2/2] feat: finished sdmt task --- populate-scripts/update/93-sdmt.sql | 40 ++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/populate-scripts/update/93-sdmt.sql b/populate-scripts/update/93-sdmt.sql index 668a280..1143497 100644 --- a/populate-scripts/update/93-sdmt.sql +++ b/populate-scripts/update/93-sdmt.sql @@ -12,6 +12,7 @@ UPDATE tasks SET "componentName": "SDMTCOMPONENT", "componentConfig": { "isPractice": true, + "maxResponseTime": 180000, "numRows": 1, "numnCols": 9, "stimuliConfig": { @@ -23,7 +24,7 @@ UPDATE tasks SET { "componentName": "SDMTCOMPONENT", "componentConfig": { - "isPractice": true, + "isPractice": false, "maxResponseTime": 120000, "numRows": 9, "numnCols": 16, @@ -32,6 +33,43 @@ UPDATE tasks SET "stimuli": null } } + }, + { + "componentName": "DISPLAYCOMPONENT", + "componentConfig": { + "title": { + "en": "Congratulations!", + "fr": "Félicitations!" + }, + "sections": [ + { + "sectionType": "text", + "textContent": { + "en": "You finished the game successfully", + "fr": "Vous avez terminé le jeu avec succès" + } + }, + { + "sectionType": "text", + "textContent": { + "en": "Thank you for your participation", + "fr": "Merci pour votre participation" + } + }, + { + "sectionType": "text", + "textContent": { + "en": "Click \\"NEXT\\" to continue", + "fr": "Cliquez sur \\"NEXT\\" pour continuer" + } + } + ], + "buttons": { + "isStart": false, + "previousDisabled": true, + "nextDisabled": false + } + } } ] }'