From 170a16850971309c4e1340b26df3bbc2d2c4d651 Mon Sep 17 00:00:00 2001 From: Gourav More Date: Thu, 24 Oct 2024 16:28:29 +0530 Subject: [PATCH] Issue #0000 fix: config issue fixes --- src/components/Practice/Mechanics3.jsx | 5 + src/utils/VoiceAnalyser.js | 8 +- src/utils/constants.js | 1396 +++++++++++++++++------- src/views/Practice/Practice.jsx | 37 +- 4 files changed, 1063 insertions(+), 383 deletions(-) diff --git a/src/components/Practice/Mechanics3.jsx b/src/components/Practice/Mechanics3.jsx index 76f1756e..a9f0fe42 100644 --- a/src/components/Practice/Mechanics3.jsx +++ b/src/components/Practice/Mechanics3.jsx @@ -16,6 +16,7 @@ import wrongSound from "../../assets/audio/wrong.wav"; import removeSound from "../../assets/audio/remove.wav"; import VoiceAnalyser from "../../utils/VoiceAnalyser"; +// TODO: update it as per File name OR update file name as per export variable name const Mechanics2 = ({ page, setPage, @@ -107,6 +108,8 @@ const Mechanics2 = ({ }, [contentId, parentWords]); const getSimilarWords = async (wordForFindingHomophones) => { + // TODO: needs to pass as prop for mechanics data + const lang = getLocalData("lang"); // const isFillInTheBlanks = type === "fillInTheBlank"; const wordToSimilar = wordForFindingHomophones @@ -201,6 +204,7 @@ const Mechanics2 = ({ setEnableNext(false); }; + // TODO: Constants declaration Need to move up const audioRef = createRef(null); const [duration, setDuration] = useState(0); const [isReady, setIsReady] = React.useState(false); @@ -219,6 +223,7 @@ const Mechanics2 = ({ } }; + // TODO: all the constants declaration Need to move up const [currrentProgress, setCurrrentProgress] = React.useState(0); const progressBarWidth = Number.isNaN(currrentProgress / duration) ? 0 diff --git a/src/utils/VoiceAnalyser.js b/src/utils/VoiceAnalyser.js index 2acdeada..ab060c5e 100644 --- a/src/utils/VoiceAnalyser.js +++ b/src/utils/VoiceAnalyser.js @@ -331,6 +331,9 @@ function VoiceAnalyser(props) { `${process.env.REACT_APP_LEARNER_AI_APP_HOST}/${config.URLS.UPDATE_LEARNER_PROFILE}/${lang}`, requestBody ); + + //TODO: handle Errors + data = updateLearnerData; responseText = data.responseText; profanityWord = await filterBadWords(data.responseText); @@ -492,15 +495,16 @@ function VoiceAnalyser(props) { }; const handlePercentageForLife = ( - percentage, + percentage, // subsessionTargetsCount contentType, - fluencyScore, + fluencyScore, // subsessionFluency language ) => { try { if (livesData) { let totalSyllables = livesData?.totalTargets; if (language === "en") { + // TODO: need to check why this is 50 if (totalSyllables > 50) { totalSyllables = 50; } diff --git a/src/utils/constants.js b/src/utils/constants.js index 5337514e..991ec224 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -3329,383 +3329,1025 @@ export const practiceSteps = [ ]; export const levelGetContent = { - 0: [ - { title: "P1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P3", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P4", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "S1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P5", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P6", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P7", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P8", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "S2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - ], - 1: [ - { title: "P1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P3", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P4", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "S1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P5", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P6", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P7", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P8", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "S2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - ], - 2: [ - { title: "P1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { - title: "P3", - criteria: "word", - template: "simple", - tags: "CEFR_ENG", - }, - { - title: "P4", - criteria: "word", - template: "simple", - tags: "CEFR_ENG", - }, - { title: "S1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P5", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { title: "P6", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - { - title: "P7", - criteria: "word", - template: "simple", - tags: "CEFR_ENG", - }, - { - title: "P8", - criteria: "word", - template: "simple", - tags: "CEFR_ENG", - }, - { title: "S2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, - ], - 3: [ - { - title: "P1", - criteria: "word", - template: "simple", - tags: "CEFR_ENG", - }, - { - title: "P2", - criteria: "word", - template: "simple", - tags: "CEFR_ENG", - }, - { title: "P3", criteria: "sentence", template: "simple", tags: "CEFR_ENG" }, - { title: "P4", criteria: "sentence", template: "simple", tags: "CEFR_ENG" }, - { title: "S1", criteria: "sentence", template: "simple", tags: "CEFR_ENG" }, - { - title: "P5", - criteria: "sentence", - template: "simple", - mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, - }, - { - title: "P6", - criteria: "sentence", - template: "simple", - mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, - }, - { title: "P7", criteria: "sentence", template: "simple", tags: "CEFR_ENG" }, - { title: "P8", criteria: "sentence", template: "simple", tags: "CEFR_ENG" }, - { title: "S2", criteria: "sentence", template: "simple", tags: "CEFR_ENG" }, - ], - 4: [ - { - title: "P1", - criteria: "sentence", - template: "simple", - competency: "L1.1", - mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, - }, - { - title: "P2", - criteria: "sentence", - template: "simple", - competency: "L1.2", - mechanism: { id: "", name: "formASentence" }, - }, - { - title: "P3", - criteria: "sentence", - template: "simple", - competency: "L1.1", - mechanism: { id: "mechanic_2", name: "readTheImage" }, - }, - { - title: "P4", - criteria: "sentence", - template: "simple", - competency: "L1.2", - }, - { - title: "S1", - criteria: "sentence", - template: "simple", - competency: "L1.1, L1.2", - mechanism: { id: "mechanic_2", name: "readTheImage" }, - }, - { - title: "P5", - criteria: "sentence", - template: "simple", - competency: "L1.2", - mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, - }, - { - title: "P6", - criteria: "sentence", - template: "simple", - competency: "L1.1", - mechanism: { id: "", name: "formASentence" }, - }, - { - title: "P7", - criteria: "sentence", - template: "simple", - competency: "L1.2", - mechanism: { id: "mechanic_2", name: "readTheImage" }, - }, - { - title: "P8", - criteria: "sentence", - template: "simple", - competency: "L1.1", - mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, - }, - { - title: "S2", - criteria: "sentence", - template: "simple", - competency: "L1.2", - mechanism: { id: "mechanic_2", name: "readTheImage" }, - }, - ], - 5: [ - { - title: "P1", - criteria: "sentence", - template: "simple", - competency: "L1.5", - mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, - }, - { - title: "P2", - criteria: "sentence", - template: "simple", - competency: "L1.6", - mechanism: { id: "", name: "formASentence" }, - }, - { - title: "P3", - criteria: "sentence", - template: "simple", - competency: "L1.5", - }, - { - title: "P4", - criteria: "sentence", - template: "simple", - competency: "L1.6", - mechanism: { id: "mechanic_2", name: "readTheImage" }, - }, - { - title: "S1", - criteria: "sentence", - template: "simple", - competency: "L1.5, L1.6", - mechanism: { id: "mechanic_2", name: "readTheImage" }, - }, - { - title: "P5", - criteria: "sentence", - template: "simple", - competency: "L1.6", - mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, - }, - { - title: "P6", - criteria: "sentence", - template: "simple", - competency: "L1.5", - mechanism: { id: "", name: "formASentence" }, - }, - { - title: "P7", - criteria: "sentence", - template: "simple", - competency: "L1.6", - mechanism: { id: "mechanic_2", name: "readTheImage" }, - }, - { - title: "P8", - criteria: "sentence", - template: "simple", - competency: "L1.5", - }, - { - title: "S2", - criteria: "sentence", - template: "simple", - competency: "L1.6", - mechanism: { id: "mechanic_2", name: "readTheImage" }, - }, - ], - 6: [ - { - title: "P1", - criteria: "sentence", - template: "simple", - competency: "L1.3", - }, - { - title: "P2", - criteria: "sentence", - template: "simple", - competency: "L1.3", - }, - { - title: "P3", - criteria: "paragraph", - template: "simple", - competency: "L1.3", - }, - { - title: "P4", - criteria: "paragraph", - template: "simple", - competency: "L1.3", - }, - { - title: "S1", - criteria: "paragraph", - template: "simple", - competency: "L1.3", - }, - { - title: "P5", - criteria: "sentence", - template: "simple", - competency: "L1.3", - }, - { - title: "P6", - criteria: "paragraph", - template: "simple", - competency: "L1.3", - }, - { - title: "P7", - criteria: "paragraph", - template: "simple", - competency: "L1.3", - }, - { - title: "P8", - criteria: "paragraph", - template: "simple", - competency: "L1.3", - }, - { - title: "S2", - criteria: "paragraph", - template: "simple", - competency: "L1.3", - }, - ], - 7: [ - { - title: "P1", - criteria: "sentence", - template: "simple", - competency: "L1.8", - }, - { - title: "P2", - criteria: "sentence", - template: "simple", - competency: "L1.8", - }, - { - title: "P3", - criteria: "paragraph", - template: "simple", - competency: "L1.8", - }, - { - title: "P4", - criteria: "paragraph", - template: "simple", - competency: "L1.8", - }, - { - title: "S1", - criteria: "paragraph", - template: "simple", - competency: "L1.8", - }, - { - title: "P5", - criteria: "paragraph", - template: "simple", - competency: "L1.8", - }, - { - title: "P6", - criteria: "paragraph", - template: "simple", - competency: "L1.8", - }, - { - title: "P7", - criteria: "paragraph", - template: "simple", - competency: "L1.8", - }, - { - title: "P8", - criteria: "paragraph", - template: "simple", - competency: "L1.8", - }, - { - title: "S2", - criteria: "paragraph", - template: "simple", - competency: "L1.8", - }, - ], - 8: [ - { title: "P1", criteria: "sentence", template: "simple" }, - { title: "P2", criteria: "sentence", template: "simple" }, - { title: "P3", criteria: "paragraph", template: "simple" }, - { title: "P4", criteria: "paragraph", template: "simple" }, - { title: "S1", criteria: "paragraph", template: "simple" }, - { title: "P5", criteria: "paragraph", template: "simple" }, - { title: "P6", criteria: "paragraph", template: "simple" }, - { title: "P7", criteria: "paragraph", template: "simple" }, - { title: "P8", criteria: "paragraph", template: "simple" }, - { title: "S2", criteria: "paragraph", template: "simple" }, - ], - 9: [ - { title: "P1", criteria: "sentence", template: "simple" }, - { title: "P2", criteria: "sentence", template: "simple" }, - { title: "P3", criteria: "paragraph", template: "simple" }, - { title: "P4", criteria: "paragraph", template: "simple" }, - { title: "S1", criteria: "paragraph", template: "simple" }, - { title: "P5", criteria: "paragraph", template: "simple" }, - { title: "P6", criteria: "paragraph", template: "simple" }, - { title: "P7", criteria: "paragraph", template: "simple" }, - { title: "P8", criteria: "paragraph", template: "simple" }, - { title: "S2", criteria: "paragraph", template: "simple" }, - ], + en: { + 0: [ + { title: "P1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P3", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P4", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "S1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P5", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P6", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P7", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P8", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "S2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + ], + 1: [ + { title: "P1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P3", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P4", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "S1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P5", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P6", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P7", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P8", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "S2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + ], + 2: [ + { title: "P1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { + title: "P3", + criteria: "word", + template: "simple", + tags: "CEFR_ENG", + }, + { + title: "P4", + criteria: "word", + template: "simple", + tags: "CEFR_ENG", + }, + { title: "S1", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P5", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { title: "P6", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + { + title: "P7", + criteria: "word", + template: "simple", + tags: "CEFR_ENG", + }, + { + title: "P8", + criteria: "word", + template: "simple", + tags: "CEFR_ENG", + }, + { title: "S2", criteria: "word", template: "simple", tags: "CEFR_ENG" }, + ], + 3: [ + { + title: "P1", + criteria: "word", + template: "simple", + tags: "CEFR_ENG", + }, + { + title: "P2", + criteria: "word", + template: "simple", + tags: "CEFR_ENG", + }, + { + title: "P3", + criteria: "sentence", + template: "simple", + tags: "CEFR_ENG", + }, + { + title: "P4", + criteria: "sentence", + template: "simple", + tags: "CEFR_ENG", + }, + { + title: "S1", + criteria: "sentence", + template: "simple", + tags: "CEFR_ENG", + }, + { + title: "P5", + criteria: "sentence", + template: "simple", + mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, + }, + { + title: "P6", + criteria: "sentence", + template: "simple", + mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, + }, + { + title: "P7", + criteria: "sentence", + template: "simple", + tags: "CEFR_ENG", + }, + { + title: "P8", + criteria: "sentence", + template: "simple", + tags: "CEFR_ENG", + }, + { + title: "S2", + criteria: "sentence", + template: "simple", + tags: "CEFR_ENG", + }, + ], + 4: [ + { + title: "P1", + criteria: "sentence", + template: "simple", + competency: "L1.1", + mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, + }, + { + title: "P2", + criteria: "sentence", + template: "simple", + competency: "L1.2", + mechanism: { id: "", name: "formASentence" }, + }, + { + title: "P3", + criteria: "sentence", + template: "simple", + competency: "L1.1", + mechanism: { id: "mechanic_2", name: "readTheImage" }, + }, + { + title: "P4", + criteria: "sentence", + template: "simple", + competency: "L1.2", + }, + { + title: "S1", + criteria: "sentence", + template: "simple", + competency: "L1.1, L1.2", + mechanism: { id: "mechanic_2", name: "readTheImage" }, + }, + { + title: "P5", + criteria: "sentence", + template: "simple", + competency: "L1.2", + mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, + }, + { + title: "P6", + criteria: "sentence", + template: "simple", + competency: "L1.1", + mechanism: { id: "", name: "formASentence" }, + }, + { + title: "P7", + criteria: "sentence", + template: "simple", + competency: "L1.2", + mechanism: { id: "mechanic_2", name: "readTheImage" }, + }, + { + title: "P8", + criteria: "sentence", + template: "simple", + competency: "L1.1", + mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, + }, + { + title: "S2", + criteria: "sentence", + template: "simple", + competency: "L1.2", + mechanism: { id: "mechanic_2", name: "readTheImage" }, + }, + ], + 5: [ + { + title: "P1", + criteria: "sentence", + template: "simple", + competency: "L1.5", + mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, + }, + { + title: "P2", + criteria: "sentence", + template: "simple", + competency: "L1.6", + mechanism: { id: "", name: "formASentence" }, + }, + { + title: "P3", + criteria: "sentence", + template: "simple", + competency: "L1.5", + }, + { + title: "P4", + criteria: "sentence", + template: "simple", + competency: "L1.6", + mechanism: { id: "mechanic_2", name: "readTheImage" }, + }, + { + title: "S1", + criteria: "sentence", + template: "simple", + competency: "L1.5, L1.6", + mechanism: { id: "mechanic_2", name: "readTheImage" }, + }, + { + title: "P5", + criteria: "sentence", + template: "simple", + competency: "L1.6", + mechanism: { id: "mechanic_1", name: "fillInTheBlank" }, + }, + { + title: "P6", + criteria: "sentence", + template: "simple", + competency: "L1.5", + mechanism: { id: "", name: "formASentence" }, + }, + { + title: "P7", + criteria: "sentence", + template: "simple", + competency: "L1.6", + mechanism: { id: "mechanic_2", name: "readTheImage" }, + }, + { + title: "P8", + criteria: "sentence", + template: "simple", + competency: "L1.5", + }, + { + title: "S2", + criteria: "sentence", + template: "simple", + competency: "L1.6", + mechanism: { id: "mechanic_2", name: "readTheImage" }, + }, + ], + 6: [ + { + title: "P1", + criteria: "sentence", + template: "simple", + competency: "L1.3", + }, + { + title: "P2", + criteria: "sentence", + template: "simple", + competency: "L1.3", + }, + { + title: "P3", + criteria: "paragraph", + template: "simple", + competency: "L1.3", + }, + { + title: "P4", + criteria: "paragraph", + template: "simple", + competency: "L1.3", + }, + { + title: "S1", + criteria: "paragraph", + template: "simple", + competency: "L1.3", + }, + { + title: "P5", + criteria: "sentence", + template: "simple", + competency: "L1.3", + }, + { + title: "P6", + criteria: "paragraph", + template: "simple", + competency: "L1.3", + }, + { + title: "P7", + criteria: "paragraph", + template: "simple", + competency: "L1.3", + }, + { + title: "P8", + criteria: "paragraph", + template: "simple", + competency: "L1.3", + }, + { + title: "S2", + criteria: "paragraph", + template: "simple", + competency: "L1.3", + }, + ], + 7: [ + { + title: "P1", + criteria: "sentence", + template: "simple", + competency: "L1.8", + }, + { + title: "P2", + criteria: "sentence", + template: "simple", + competency: "L1.8", + }, + { + title: "P3", + criteria: "paragraph", + template: "simple", + competency: "L1.8", + }, + { + title: "P4", + criteria: "paragraph", + template: "simple", + competency: "L1.8", + }, + { + title: "S1", + criteria: "paragraph", + template: "simple", + competency: "L1.8", + }, + { + title: "P5", + criteria: "paragraph", + template: "simple", + competency: "L1.8", + }, + { + title: "P6", + criteria: "paragraph", + template: "simple", + competency: "L1.8", + }, + { + title: "P7", + criteria: "paragraph", + template: "simple", + competency: "L1.8", + }, + { + title: "P8", + criteria: "paragraph", + template: "simple", + competency: "L1.8", + }, + { + title: "S2", + criteria: "paragraph", + template: "simple", + competency: "L1.8", + }, + ], + 8: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 9: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + }, + ta: { + 0: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 1: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 2: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 3: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 4: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 5: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 6: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 7: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 8: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 9: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + }, + hi: { + 0: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 1: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 2: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 3: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 4: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 5: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 6: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 7: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 8: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 9: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + }, + kn: { + 0: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 1: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 2: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 3: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 4: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 5: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 6: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 7: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 8: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 9: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + }, + te: { + 0: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 1: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 2: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 3: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 4: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 5: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 6: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 7: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 8: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 9: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + }, + gu: { + 0: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 1: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 2: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "word", template: "simple" }, + { title: "P4", criteria: "word", template: "simple" }, + { title: "S1", criteria: "word", template: "simple" }, + { title: "P5", criteria: "word", template: "simple" }, + { title: "P6", criteria: "word", template: "simple" }, + { title: "P7", criteria: "word", template: "simple" }, + { title: "P8", criteria: "word", template: "simple" }, + { title: "S2", criteria: "word", template: "simple" }, + ], + 3: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 4: [ + { title: "P1", criteria: "word", template: "simple" }, + { title: "P2", criteria: "word", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 5: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "sentence", template: "simple" }, + { title: "P4", criteria: "sentence", template: "simple" }, + { title: "S1", criteria: "sentence", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "sentence", template: "simple" }, + { title: "P7", criteria: "sentence", template: "simple" }, + { title: "P8", criteria: "sentence", template: "simple" }, + { title: "S2", criteria: "sentence", template: "simple" }, + ], + 6: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "sentence", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 7: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 8: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + 9: [ + { title: "P1", criteria: "sentence", template: "simple" }, + { title: "P2", criteria: "sentence", template: "simple" }, + { title: "P3", criteria: "paragraph", template: "simple" }, + { title: "P4", criteria: "paragraph", template: "simple" }, + { title: "S1", criteria: "paragraph", template: "simple" }, + { title: "P5", criteria: "paragraph", template: "simple" }, + { title: "P6", criteria: "paragraph", template: "simple" }, + { title: "P7", criteria: "paragraph", template: "simple" }, + { title: "P8", criteria: "paragraph", template: "simple" }, + { title: "S2", criteria: "paragraph", template: "simple" }, + ], + }, }; export function callConfettiSnow() { diff --git a/src/views/Practice/Practice.jsx b/src/views/Practice/Practice.jsx index bcf017bf..17fe8054 100644 --- a/src/views/Practice/Practice.jsx +++ b/src/views/Practice/Practice.jsx @@ -38,7 +38,7 @@ const Practice = () => { const [questions, setQuestions] = useState([]); const [enableNext, setEnableNext] = useState(false); const [progressData, setProgressData] = useState({}); - const [level, setLevel] = useState(""); + const [level, setLevel] = useState(0); const [isShowCase, setIsShowCase] = useState(false); const [startShowCase, setStartShowCase] = useState(false); const limit = 5; @@ -215,7 +215,9 @@ const Practice = () => { let newQuestionIndex = currentQuestion === questions.length - 1 ? 0 : currentQuestion + 1; - const currentGetContent = levelGetContent?.[level]?.find( + const currentGetContent = levelGetContent[ + localStorage.getItem("lang") || "en" + ]?.[level]?.find( (elem) => elem.title === practiceSteps?.[newPracticeStep]?.name ); @@ -319,6 +321,8 @@ const Practice = () => { (currentGetContent?.tags ? `&tags=${currentGetContent?.tags}` : "") ); + //TODO: required only for S1 and S2 + setTotalSyllableCount(resGetContent?.data?.totalSyllableCount); setLivesData({ ...livesData, @@ -334,11 +338,17 @@ const Practice = () => { currentPracticeStep === 3 || currentPracticeStep === 8; setIsShowCase(showcaseLevel); + // TODO: API returns contents if 200 status quesArr = [...quesArr, ...(resGetContent?.data?.content || [])]; setCurrentContentType(resGetContent?.data?.content?.[0]?.contentType); setCurrentCollectionId(resGetContent?.data?.content?.[0]?.collectionId); + + // TODO: not required - not using this anywhere setAssessmentResponse(resGetContent); + setCurrentQuestion(0); + + // TODO: not required - we are geting this data from API practiceProgress[virtualId] = { currentQuestion: newQuestionIndex, currentPracticeProgress, @@ -349,11 +359,14 @@ const Practice = () => { localStorage.setItem("storyTitle", resGetContent?.name); setQuestions(quesArr); + + // TODO: needs to revisit this logic setTimeout(() => { setMechanism(currentGetContent.mechanism); }, 1000); } else if (currentQuestion < questions.length - 1) { setCurrentQuestion(currentQuestion + 1); + practiceProgress[virtualId] = { currentQuestion: newQuestionIndex, currentPracticeProgress, @@ -412,6 +425,9 @@ const Practice = () => { const getMilestoneDetails = await axios.get( `${process.env.REACT_APP_LEARNER_AI_APP_HOST}/${config.URLS.GET_MILESTONE}/${virtualId}?language=${lang}` ); + + // TODO: validate the getMilestoneDetails API return + setLocalData( "getMilestone", JSON.stringify({ ...getMilestoneDetails.data }) @@ -427,9 +443,14 @@ const Practice = () => { const resLessons = await axios.get( `${process.env.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST}/${config.URLS.GET_LESSON_PROGRESS_BY_ID}/${virtualId}?language=${lang}` ); + + // TODO: Handle Error for lessons - no lesson progress - starting point should be P1 + const getPointersDetails = await axios.get( `${process.env.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}` ); + + // TODO: Just Opss icon - we are trying to fetch the score for you setPoints(getPointersDetails?.data?.result?.totalLanguagePoints || 0); let userState = Number.isInteger( @@ -438,6 +459,7 @@ const Practice = () => { ? Number(resLessons.data?.result?.result?.lesson) : 0; + // TODO: revisit this - looks like not required let practiceProgress = getLocalData("practiceProgress"); practiceProgress = practiceProgress ? JSON.parse(practiceProgress) : {}; @@ -447,7 +469,9 @@ const Practice = () => { currentPracticeStep: userState || 0, }; - const currentGetContent = levelGetContent?.[level]?.find( + const currentGetContent = levelGetContent[ + localStorage.getItem("lang") || "en" + ]?.[level]?.find( (elem) => elem.title === practiceSteps?.[userState].name ); @@ -461,6 +485,9 @@ const Practice = () => { : "") + (currentGetContent?.tags ? `&tags=${currentGetContent?.tags}` : "") ); + + // TODO: handle error if resWord is empty + setTotalSyllableCount(resWord?.data?.totalSyllableCount); setLivesData({ ...livesData, @@ -545,7 +572,9 @@ const Practice = () => { setProgressData(practiceProgress[virtualId]); - const currentGetContent = levelGetContent?.[level]?.find( + const currentGetContent = levelGetContent[ + localStorage.getItem("lang") || "en" + ]?.[level]?.find( (elem) => elem.title === practiceSteps?.[newCurrentPracticeStep].name ); let quesArr = [];