Skip to content

Commit

Permalink
Merge pull request Sunbird-ALL#201 from Sunbird-ALL/all-1.2-tn-dev-co…
Browse files Browse the repository at this point in the history
…nfig

All 1.2 tn dev config
  • Loading branch information
gouravmore authored Nov 5, 2024
2 parents 8a34bd7 + ab5ee7e commit 7190154
Show file tree
Hide file tree
Showing 4 changed files with 1,061 additions and 383 deletions.
3 changes: 3 additions & 0 deletions src/components/Practice/Mechanics3.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand All @@ -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
Expand Down
8 changes: 6 additions & 2 deletions src/utils/VoiceAnalyser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down
Loading

0 comments on commit 7190154

Please sign in to comment.