Skip to content

Commit

Permalink
feat: judgement of line task
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoalee committed Dec 2, 2024
1 parent 3cbec50 commit bc77631
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 25 deletions.
4 changes: 2 additions & 2 deletions populate-scripts/insert-db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ INSERT INTO tasks (id, from_platform, task_type, name, description, external_url
NULL,
"PSHARPLAB",
"EXPERIMENTAL",
"SDMT",
"Symbol Digit Modalities Task",
"Lines And Angles Game",
"Participants must judge and match the angle of a line",
"",
'{}'
);
41 changes: 18 additions & 23 deletions populate-scripts/update/52-face-name-association.sql
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ UPDATE tasks SET
"maxResponseTime": 10000,
"interTrialDelay": 500,
"blockNum": 1,
"durationStimulusPresented": 3000,
"durationStimulusPresented": 50,
"stimuliConfig": {
"type": "generated",
"stimuli": null
Expand Down Expand Up @@ -178,6 +178,12 @@ UPDATE tasks SET
"componentName": "DISPLAYCOMPONENT",
"componentConfig": {
"title": "",
"timerConfig": {
"timer": 10000,
"showTimer": true,
"canSkipTimer": false,
"countDown": true
},
"sections": [
{
"sectionType": "text",
Expand All @@ -193,12 +199,7 @@ UPDATE tasks SET
"fr": "Vous verrez à nouveau les visages et les noms. Essayez de mémoriser le nom associé à chaque visage."
}
}
],
"buttons": {
"isStart": true,
"previousDisabled": true,
"nextDisabled": false
}
]
}
},
{
Expand All @@ -209,7 +210,7 @@ UPDATE tasks SET
"maxResponseTime": 10000,
"interTrialDelay": 500,
"blockNum": 2,
"durationStimulusPresented": 3000,
"durationStimulusPresented": 50,
"stimuliConfig": {
"type": "generated",
"stimuli": null
Expand Down Expand Up @@ -253,7 +254,13 @@ UPDATE tasks SET
{
"componentName": "DISPLAYCOMPONENT",
"componentConfig": {
"title": "Testing phase",
"title": "",
"timerConfig": {
"timer": 10000,
"showTimer": true,
"canSkipTimer": false,
"countDown": true
},
"sections": [
{
"sectionType": "text",
Expand All @@ -268,20 +275,8 @@ UPDATE tasks SET
"en": "In this case, you would click ‘Yes’.",
"fr": "Dans ce cas, vous devriez cliquer sur ‘Oui’."
}
},
{
"sectionType": "text",
"textContent": {
"en": "Click \\"START\\" to start",
"fr": "Cliquez sur \\"Commencer\\" pour commencer"
}
}
],
"buttons": {
"isStart": true,
"previousDisabled": true,
"nextDisabled": false
}
]
}
},
{
Expand All @@ -292,7 +287,7 @@ UPDATE tasks SET
"maxResponseTime": 10000,
"interTrialDelay": 500,
"blockNum": 3,
"durationStimulusPresented": 3000,
"durationStimulusPresented": 50,
"stimuliConfig": {
"type": "generated",
"stimuli": null
Expand Down
142 changes: 142 additions & 0 deletions populate-scripts/update/94-judgement-of-line.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@

-- Judgement of Line Task
UPDATE tasks SET
from_platform = "PSHARPLAB",
task_type = "EXPERIMENTAL",
name = "Lines and Angles Game",
description = "Participants must judge and match the angle of a line",
config = '{
"taskConfig": {},
"metadata": [
{
"componentName": "DISPLAYCOMPONENT",
"componentConfig": {
"title": {
"en": "Welcome to the Lines and Angles Game",
"fr": "Bienvenue au Jeu des Lignes et des Angles"
},
"sections": [
{
"sectionType": "text",
"textContent": {
"en": "Please read the instructions carefully.",
"fr": "Lisez attentivement les instructions."
}
},
{
"sectionType": "text",
"textContent": {
"en": "Click \\"NEXT\\" to continue",
"fr": "Cliquez sur \\"SUIVANT\\" pour continuer"
}
}
],
"buttons": {
"isStart": false,
"previousDisabled": true,
"nextDisabled": false
}
}
},
{
"componentName": "DISPLAYCOMPONENT",
"componentConfig": {
"title": "",
"sections": [
{
"sectionType": "text",
"textContent": {
"en": "You will be shown a line like this:",
"fr": "Une ligne comme celle-ci sera affichée:"
}
},
{
"sectionType": "image-horizontal",
"imageAlignment": "center",
"imagePath": "/assets/images/instructions/judgement-of-line/instructions-1.png"
},
{
"sectionType": "text",
"textContent": {
"en": "Underneath it, you will see a set of 15 lines:",
"fr": "En dessous, vous verrez un ensemble de 15 lignes:"
}
},
{
"sectionType": "image-horizontal",
"imageAlignment": "center",
"imagePath": "/assets/images/instructions/judgement-of-line/instructions-2.png"
},
{
"sectionType": "text",
"textContent": {
"en": "With your mouse, click on the line that matches the angle of the single line at the top. There will be 20 lines to match and you’ll have 10 seconds for each line.",
"fr": "Avec votre souris vous devrez cliquer sur la ligne qui correspond à l’angle de la ligne unique en haut. Vous aurez 20 lignes à identifier et vous disposerez de 10 secondes pour chaque ligne."
}
},
{
"sectionType": "text",
"textContent": {
"en": "Click \\"START\\" to start",
"fr": "Cliquez sur \\"COMMENCER\\" pour commencer"
}
}
],
"buttons": {
"isStart": true,
"previousDisabled": false,
"nextDisabled": false
}
}
},
{
"componentName": "JUDGEMENTOFLINECOMPONENT",
"componentConfig": {
"isPractice": false,
"maxResponseTime": 10000,
"durationOfFeedback": 3000,
"numTrials": 20,
"interTrialDelay": 5000,
"stimuliConfig": {
"type": "hardcoded",
"stimuli": [ "1", "8", "11", "7", "10", "13", "4", "12", "2", "5", "8", "3", "11", "4", "15", "6" ,"12", "5", "14", "9" ]
}
}
},
{
"componentName": "DISPLAYCOMPONENT",
"componentConfig": {
"title": "",
"sections": [
{
"sectionType": "text",
"textContent": {
"en": "Congratulations! You completed the game.",
"fr": "Félicitations! Vous avez terminé le jeu."
}
},
{
"sectionType": "text",
"textContent": {
"en": "Thank you for your participation.",
"fr": "Merci pour votre participation."
}
},
{
"sectionType": "text",
"textContent": {
"en": "Click \\"CONTINUE\\"",
"fr": "Cliquez sur \\"CONTINUER\\""
}
}
],
"buttons": {
"isStart": false,
"previousDisabled": true,
"nextDisabled": false
}
}
}
]
}'
WHERE id = 94;

0 comments on commit bc77631

Please sign in to comment.