From a7631635f8fc18248854a9ba3398f0092b300da8 Mon Sep 17 00:00:00 2001 From: "ITHQ1947\\saritha.pillai" Date: Tue, 3 Sep 2024 12:40:37 +0530 Subject: [PATCH 1/2] D-cog game changes --- src/components/EmbeddedActivity.tsx | 8 ++++++++ src/components/Researcher/ActivityList/Activity.tsx | 1 + src/components/Researcher/ActivityList/AddActivity.tsx | 2 ++ src/components/Researcher/ActivityList/Index.tsx | 1 + src/components/Survey.tsx | 1 + 5 files changed, 13 insertions(+) diff --git a/src/components/EmbeddedActivity.tsx b/src/components/EmbeddedActivity.tsx index 462c2f6e..5d716e3a 100644 --- a/src/components/EmbeddedActivity.tsx +++ b/src/components/EmbeddedActivity.tsx @@ -46,6 +46,7 @@ const demoActivities = { "lamp.emotion_recognition": "emotion_recognition", "lamp.symbol_digit_substitution": "symbol_digit_substitution", "lamp.gyroscope": "gyroscope", + "lamp.dcog": "d-cog", } export default function EmbeddedActivity({ participant, activity, name, onComplete, noBack, tab, ...props }) { @@ -192,6 +193,13 @@ export default function EmbeddedActivity({ participant, activity, name, onComple const exist = localStorage.getItem("first-time-" + (participant?.id ?? participant) + "-" + currentActivity?.id) try { setSaved(false) + console.log({ + ...settings, + activity: currentActivity, + configuration: { language: i18n.language }, + autoCorrect: !(exist === "true"), + noBack: noBack, + }) setSettings({ ...settings, activity: currentActivity, diff --git a/src/components/Researcher/ActivityList/Activity.tsx b/src/components/Researcher/ActivityList/Activity.tsx index 511d6c03..ca8151eb 100644 --- a/src/components/Researcher/ActivityList/Activity.tsx +++ b/src/components/Researcher/ActivityList/Activity.tsx @@ -30,6 +30,7 @@ export const games = [ "lamp.emotion_recognition", "lamp.symbol_digit_substitution", "lamp.gyroscope", + "lamp.dcog", ] const useStyles = makeStyles((theme: Theme) => diff --git a/src/components/Researcher/ActivityList/AddActivity.tsx b/src/components/Researcher/ActivityList/AddActivity.tsx index e4616872..7a53665d 100644 --- a/src/components/Researcher/ActivityList/AddActivity.tsx +++ b/src/components/Researcher/ActivityList/AddActivity.tsx @@ -157,6 +157,7 @@ export default function AddActivity({ "lamp.maze_game": `${t("Maze Game")}`, "lamp.emotion_recognition": `${t("Emotion Recognition")}`, "lamp.symbol_digit_substitution": `${t("Symbol-digit Substitution")}`, + "lamp.dcog": `${t("D-Cog")}`, } const getActivitySpec = async (id) => { @@ -173,6 +174,7 @@ export default function AddActivity({ useEffect(() => { ;(async () => { + LAMP.ActivitySpec.create({ name: "lamp.dcog" }) const allSpecs = await LAMP.ActivitySpec.all() let availableSpecs = allSpecs.filter((x: any) => Object.keys(activitiesObj).includes(x?.id)) let otherSpecs = allSpecs.filter((x: any) => !Object.keys(activitiesObj).includes(x?.id)) diff --git a/src/components/Researcher/ActivityList/Index.tsx b/src/components/Researcher/ActivityList/Index.tsx index 6ac36940..f1530e53 100644 --- a/src/components/Researcher/ActivityList/Index.tsx +++ b/src/components/Researcher/ActivityList/Index.tsx @@ -73,6 +73,7 @@ export const games = [ "lamp.emotion_recognition", "lamp.symbol_digit_substitution", "lamp.gyroscope", + "lamp.dcog", ] export default function ActivityList({ researcherId, diff --git a/src/components/Survey.tsx b/src/components/Survey.tsx index ac04b28e..5e10979d 100644 --- a/src/components/Survey.tsx +++ b/src/components/Survey.tsx @@ -32,6 +32,7 @@ export const games = [ "lamp.emotion_recognition", "lamp.symbol_digit_substitution", "lamp.gyroscope", + "lamp.dcog", ] export default function Survey({ participant, activities, showStreak, ...props }) { From 453a32682494cbd65613a03dd77176d3c7b449b6 Mon Sep 17 00:00:00 2001 From: "ITHQ1947\\saritha.pillai" Date: Tue, 3 Sep 2024 12:43:41 +0530 Subject: [PATCH 2/2] D-cog game changes --- src/components/EmbeddedActivity.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/components/EmbeddedActivity.tsx b/src/components/EmbeddedActivity.tsx index 5d716e3a..3174e85a 100644 --- a/src/components/EmbeddedActivity.tsx +++ b/src/components/EmbeddedActivity.tsx @@ -193,13 +193,6 @@ export default function EmbeddedActivity({ participant, activity, name, onComple const exist = localStorage.getItem("first-time-" + (participant?.id ?? participant) + "-" + currentActivity?.id) try { setSaved(false) - console.log({ - ...settings, - activity: currentActivity, - configuration: { language: i18n.language }, - autoCorrect: !(exist === "true"), - noBack: noBack, - }) setSettings({ ...settings, activity: currentActivity,