diff --git a/.github/workflows/all-staging-tn.yml b/.github/workflows/all-staging-tn.yml index ff516169..7813bd53 100644 --- a/.github/workflows/all-staging-tn.yml +++ b/.github/workflows/all-staging-tn.yml @@ -3,7 +3,7 @@ name: ALL tn staging Deployment on: push: branches: - - all-1.2-tn-staging + - all-1.3-tn-staging jobs: deploy: diff --git a/src/components/Practice/Mechanics3.jsx b/src/components/Practice/Mechanics3.jsx index 8bc563dd..1d26fccc 100644 --- a/src/components/Practice/Mechanics3.jsx +++ b/src/components/Practice/Mechanics3.jsx @@ -19,6 +19,7 @@ import { Modal } from "@mui/material"; import ZoomInIcon from "@mui/icons-material/ZoomIn"; import CloseIcon from "@mui/icons-material/Close"; +// TODO: update it as per File name OR update file name as per export variable name const Mechanics2 = ({ page, setPage, @@ -102,6 +103,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); @@ -120,6 +122,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 ca9fa094..1884ab47 100644 --- a/src/utils/VoiceAnalyser.js +++ b/src/utils/VoiceAnalyser.js @@ -366,6 +366,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); @@ -538,15 +541,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 b001022d..5802c37f 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: "mechanic_3", 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: "mechanic_3", 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: "mechanic_3", 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: "mechanic_3", 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: "mechanic_3", 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: "mechanic_3", 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: "mechanic_3", 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: "mechanic_3", 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 a2bfe855..55e8e579 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 = [];