Skip to content

Commit

Permalink
Digit span game integration in dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
sarithapillai8 committed Jan 14, 2025
1 parent c472667 commit 19f7e2e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/PreventSelectedActivities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,12 @@ export const strategies = {
return (slices || []).map((x) => (!!x.type ? 1 : 0)).reduce((prev, cur) => prev + cur, 0)
},
"lamp.cats_and_dogs": (slices, activity, scopedItem) => (slices.correct_answers / slices.total_questions) * 100,
"lamp.digit_span": (slices, activity, scopedItem) => (slices.correct_answers / slices.total_questions) * 100,
"lamp.digit_span": (slices, activity, scopedItem) =>
slices.score == "NaN"
? 0
: (parseInt(slices.score ?? 0).toFixed(1) || 0) > 100
? 100
: parseInt(slices.score ?? 0).toFixed(1) || 0,
"lamp.memory_game": (slices, activity, scopedItem) => (slices.correct_answers / slices.total_questions) * 100,
"lamp.funny_memory": (slices, activity, scopedItem) =>
(slices.number_of_correct_pairs_recalled / slices.number_of_total_pairs) * 100,
Expand Down

0 comments on commit 19f7e2e

Please sign in to comment.