l-min-components 1.7.1529 → 1.7.1531
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/reportsComponents/reportQuestions/components/response.jsx +17 -13
- package/src/components/reportsComponents/reportQuestions/index.jsx +22 -3
- package/src/components/reportsComponents/reportQuestions/questions/dialogueScripted.jsx +10 -3
- package/src/components/reportsComponents/reportQuestions/questions/dialogueUnscripted.jsx +10 -3
- package/src/components/reportsComponents/reportQuestions/questions/essayScripted.jsx +7 -4
- package/src/components/reportsComponents/reportQuestions/questions/essayUnscripted.jsx +10 -3
- package/src/components/reportsComponents/reportQuestions/questions/essayWritten.jsx +7 -3
- package/src/components/reportsComponents/reportQuestions/questions/matchPair.jsx +5 -5
- package/src/components/reportsComponents/reportQuestions/questions/quizMultipleChoice.jsx +6 -2
- package/src/components/reportsComponents/reportQuestions/questions/quizScripted.jsx +4 -4
- package/src/components/reportsComponents/reportQuestions/questions/quizUnsripted.jsx +11 -4
- package/src/components/reportsComponents/reportQuestions/questions/reading.jsx +5 -4
- package/src/components/reportsComponents/reportQuestions/questions/soundPlay.jsx +4 -3
- package/src/components/reportsComponents/reportQuestions/questions/wordPlayMultipleChoice.jsx +6 -2
- package/src/components/reportsComponents/reportQuestions/questions/wordPlayText.jsx +6 -4
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
import {
|
|
3
3
|
ResponseAiWordFlow,
|
|
4
4
|
ResponseContainer,
|
|
5
5
|
ResponseContent,
|
|
6
6
|
FallbackResponse,
|
|
7
|
-
} from
|
|
8
|
-
import Redx from
|
|
9
|
-
import GoodCheck from
|
|
10
|
-
import classNames from
|
|
7
|
+
} from "./style/response.style";
|
|
8
|
+
import Redx from "../../../../assets/svg/redX";
|
|
9
|
+
import GoodCheck from "../../../../assets/svg/goodCheck";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @param {Object} props
|
|
@@ -19,26 +19,28 @@ import classNames from 'classnames';
|
|
|
19
19
|
* @param {boolean} props.goodFallback
|
|
20
20
|
* @param {boolean} props.rightIcon
|
|
21
21
|
* @param {boolean} props.defaultError
|
|
22
|
+
* @param {boolean} props.isPersonal
|
|
22
23
|
* @returns {React.ReactNode}
|
|
23
24
|
*/
|
|
24
25
|
const Response = ({
|
|
25
|
-
title =
|
|
26
|
+
title = "Student response",
|
|
26
27
|
response,
|
|
27
28
|
isAiWordFlow = false,
|
|
28
29
|
processing = false,
|
|
29
|
-
fallbackMessage =
|
|
30
|
+
fallbackMessage = "",
|
|
30
31
|
goodFallback = false,
|
|
31
32
|
rightIcon,
|
|
32
33
|
defaultError,
|
|
34
|
+
isPersonal,
|
|
33
35
|
}) => {
|
|
34
36
|
const setupAiWordFlow = () => {
|
|
35
|
-
if (!response) return
|
|
36
|
-
if (isAiWordFlow && typeof response !==
|
|
37
|
+
if (!response) return "";
|
|
38
|
+
if (isAiWordFlow && typeof response !== "string") {
|
|
37
39
|
const htmlString = response
|
|
38
40
|
?.map((item) => {
|
|
39
41
|
return `<span style="color: ${item?.color};">${item?.text}</span>`;
|
|
40
42
|
})
|
|
41
|
-
.join(
|
|
43
|
+
.join(" ");
|
|
42
44
|
return htmlString;
|
|
43
45
|
}
|
|
44
46
|
return response;
|
|
@@ -70,13 +72,15 @@ const Response = ({
|
|
|
70
72
|
))}
|
|
71
73
|
<p
|
|
72
74
|
className={classNames({
|
|
73
|
-
|
|
75
|
+
"good-fallback": goodFallback,
|
|
74
76
|
})}
|
|
75
77
|
>
|
|
76
78
|
{fallbackMessage ||
|
|
77
79
|
(isAiWordFlow && !defaultError
|
|
78
|
-
?
|
|
79
|
-
:
|
|
80
|
+
? "Analysis unavailable. We couldn’t generate it this time."
|
|
81
|
+
: isPersonal
|
|
82
|
+
? "No response was provided for this question."
|
|
83
|
+
: "No response was provided by the student for this question.")}
|
|
80
84
|
</p>
|
|
81
85
|
|
|
82
86
|
{rightIcon && (goodFallback ? <GoodCheck /> : <Redx />)}
|
|
@@ -71,6 +71,7 @@ const ReportQuestions = ({
|
|
|
71
71
|
answerData,
|
|
72
72
|
onSwitchQuestion,
|
|
73
73
|
loading,
|
|
74
|
+
mainTitle,
|
|
74
75
|
}) => {
|
|
75
76
|
const { findText } = useTranslation(wordStore);
|
|
76
77
|
const [questionList, setQuestionList] = useState([]);
|
|
@@ -154,6 +155,8 @@ const ReportQuestions = ({
|
|
|
154
155
|
const handlePrev = () => {
|
|
155
156
|
if (prevId) onSwitchQuestion?.(prevId);
|
|
156
157
|
};
|
|
158
|
+
|
|
159
|
+
const isPersonal = accountType === "personal";
|
|
157
160
|
return (
|
|
158
161
|
<Container>
|
|
159
162
|
{(gradeQuestionData?.loading || loading) && (
|
|
@@ -175,9 +178,9 @@ const ReportQuestions = ({
|
|
|
175
178
|
)}
|
|
176
179
|
<Header onClick={onClose}>
|
|
177
180
|
<ArrowLeft />
|
|
178
|
-
{question && (
|
|
181
|
+
{question && !loading && (
|
|
179
182
|
<h1>
|
|
180
|
-
{question
|
|
183
|
+
{mainTitle || question?.label}
|
|
181
184
|
|
|
182
185
|
{/* {question.type && <span>({question.type})</span>} */}
|
|
183
186
|
</h1>
|
|
@@ -244,6 +247,7 @@ const ReportQuestions = ({
|
|
|
244
247
|
answerData={answerData}
|
|
245
248
|
aiData={AiData}
|
|
246
249
|
setToggle={setToggle}
|
|
250
|
+
isPersonal={isPersonal}
|
|
247
251
|
/>
|
|
248
252
|
)}
|
|
249
253
|
{questionType === "essay-scripted" && (
|
|
@@ -252,6 +256,7 @@ const ReportQuestions = ({
|
|
|
252
256
|
answerData={answerData}
|
|
253
257
|
aiData={AiData}
|
|
254
258
|
setToggle={setToggle}
|
|
259
|
+
isPersonal={isPersonal}
|
|
255
260
|
/>
|
|
256
261
|
)}
|
|
257
262
|
{questionType === "essay-unscripted" && (
|
|
@@ -260,6 +265,7 @@ const ReportQuestions = ({
|
|
|
260
265
|
answerData={answerData}
|
|
261
266
|
aiData={AiData}
|
|
262
267
|
setToggle={setToggle}
|
|
268
|
+
isPersonal={isPersonal}
|
|
263
269
|
/>
|
|
264
270
|
)}
|
|
265
271
|
{questionType === "sound-play" && (
|
|
@@ -268,6 +274,7 @@ const ReportQuestions = ({
|
|
|
268
274
|
answerData={answerData}
|
|
269
275
|
aiData={AiData}
|
|
270
276
|
setToggle={setToggle}
|
|
277
|
+
isPersonal={isPersonal}
|
|
271
278
|
/>
|
|
272
279
|
)}
|
|
273
280
|
{questionType === "reading" && (
|
|
@@ -276,22 +283,29 @@ const ReportQuestions = ({
|
|
|
276
283
|
answerData={answerData}
|
|
277
284
|
aiData={AiData}
|
|
278
285
|
setToggle={setToggle}
|
|
286
|
+
isPersonal={isPersonal}
|
|
279
287
|
/>
|
|
280
288
|
)}
|
|
281
289
|
{questionType === "word-play-text" && (
|
|
282
290
|
<WordPlayText
|
|
283
291
|
data={findedQuestion}
|
|
284
292
|
answerData={answerData}
|
|
293
|
+
isPersonal={isPersonal}
|
|
285
294
|
/>
|
|
286
295
|
)}
|
|
287
296
|
{questionType === "word-play-multiple-choice" && (
|
|
288
297
|
<WordPlayMultipleChoice
|
|
289
298
|
data={findedQuestion}
|
|
290
299
|
answerData={answerData}
|
|
300
|
+
isPersonal={isPersonal}
|
|
291
301
|
/>
|
|
292
302
|
)}
|
|
293
303
|
{questionType === "match-pair" && (
|
|
294
|
-
<MatchPair
|
|
304
|
+
<MatchPair
|
|
305
|
+
data={findedQuestion}
|
|
306
|
+
answerData={answerData}
|
|
307
|
+
isPersonal={isPersonal}
|
|
308
|
+
/>
|
|
295
309
|
)}
|
|
296
310
|
{questionType === "quiz-scripted" && (
|
|
297
311
|
<QuizScripted
|
|
@@ -299,6 +313,7 @@ const ReportQuestions = ({
|
|
|
299
313
|
answerData={answerData}
|
|
300
314
|
aiData={AiData}
|
|
301
315
|
setToggle={setToggle}
|
|
316
|
+
isPersonal={isPersonal}
|
|
302
317
|
/>
|
|
303
318
|
)}
|
|
304
319
|
{questionType === "quiz-unscripted" && (
|
|
@@ -307,12 +322,14 @@ const ReportQuestions = ({
|
|
|
307
322
|
answerData={answerData}
|
|
308
323
|
aiData={AiData}
|
|
309
324
|
setToggle={setToggle}
|
|
325
|
+
isPersonal={isPersonal}
|
|
310
326
|
/>
|
|
311
327
|
)}
|
|
312
328
|
{questionType === "quiz-multiple-choice" && (
|
|
313
329
|
<QuizMultipleChoice
|
|
314
330
|
data={findedQuestion}
|
|
315
331
|
answerData={answerData}
|
|
332
|
+
isPersonal={isPersonal}
|
|
316
333
|
/>
|
|
317
334
|
)}
|
|
318
335
|
|
|
@@ -322,6 +339,7 @@ const ReportQuestions = ({
|
|
|
322
339
|
answerData={answerData}
|
|
323
340
|
aiData={AiData}
|
|
324
341
|
setToggle={setToggle}
|
|
342
|
+
isPersonal={isPersonal}
|
|
325
343
|
/>
|
|
326
344
|
)}
|
|
327
345
|
{questionType === "dialogue-unscripted" && (
|
|
@@ -330,6 +348,7 @@ const ReportQuestions = ({
|
|
|
330
348
|
answerData={answerData}
|
|
331
349
|
aiData={AiData}
|
|
332
350
|
setToggle={setToggle}
|
|
351
|
+
isPersonal={isPersonal}
|
|
333
352
|
/>
|
|
334
353
|
)}
|
|
335
354
|
</>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useState } from
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
QuestionSection,
|
|
4
4
|
QuestionSectionAction,
|
|
@@ -14,7 +14,13 @@ import ResponseAudioV2 from "../components/responseAudio.v2";
|
|
|
14
14
|
import QuestionDropdown from "../components/questionDropdown";
|
|
15
15
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
16
16
|
import wordStore from "../../../../mc/wordStore.json";
|
|
17
|
-
const DialogueScripted = ({
|
|
17
|
+
const DialogueScripted = ({
|
|
18
|
+
data,
|
|
19
|
+
aiData,
|
|
20
|
+
setToggle,
|
|
21
|
+
answerData,
|
|
22
|
+
isPersonal,
|
|
23
|
+
}) => {
|
|
18
24
|
const { findText } = useTranslation(wordStore);
|
|
19
25
|
const [selected, setSelected] = useState(1);
|
|
20
26
|
const [analysis, setAnalysis] = useState(null);
|
|
@@ -40,7 +46,7 @@ const DialogueScripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
40
46
|
const models = setupAnalysis(
|
|
41
47
|
selectedModel,
|
|
42
48
|
selectedResponse?.recording,
|
|
43
|
-
answerData?.ai_score
|
|
49
|
+
answerData?.ai_score
|
|
44
50
|
);
|
|
45
51
|
setAnalysis(models);
|
|
46
52
|
}
|
|
@@ -78,6 +84,7 @@ const DialogueScripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
78
84
|
<Response
|
|
79
85
|
title={findText("Selected option")}
|
|
80
86
|
response={selectedResponse?.text}
|
|
87
|
+
isPersonal={isPersonal}
|
|
81
88
|
/>
|
|
82
89
|
</TitleAndSubtitle>
|
|
83
90
|
<QuestionSectionWithAnalysis>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useState } from
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
QuestionSection,
|
|
4
4
|
QuestionSectionAction,
|
|
@@ -14,7 +14,13 @@ import QuestionDropdown from "../components/questionDropdown";
|
|
|
14
14
|
import ResponseAudioV2 from "../components/responseAudio.v2";
|
|
15
15
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
16
16
|
import wordStore from "../../../../mc/wordStore.json";
|
|
17
|
-
const DialogueUnscripted = ({
|
|
17
|
+
const DialogueUnscripted = ({
|
|
18
|
+
data,
|
|
19
|
+
aiData,
|
|
20
|
+
setToggle,
|
|
21
|
+
answerData,
|
|
22
|
+
isPersonal,
|
|
23
|
+
}) => {
|
|
18
24
|
const { findText } = useTranslation(wordStore);
|
|
19
25
|
const [selected, setSelected] = useState(1);
|
|
20
26
|
const [analysis, setAnalysis] = useState(null);
|
|
@@ -40,7 +46,7 @@ const DialogueUnscripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
40
46
|
const models = setupAnalysis(
|
|
41
47
|
selectedModel,
|
|
42
48
|
selectedResponse?.recording,
|
|
43
|
-
data?.ai_score
|
|
49
|
+
data?.ai_score
|
|
44
50
|
);
|
|
45
51
|
setAnalysis(models);
|
|
46
52
|
}
|
|
@@ -84,6 +90,7 @@ const DialogueUnscripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
84
90
|
}
|
|
85
91
|
isAiWordFlow
|
|
86
92
|
defaultError={!selectedResponse?.recording?.url}
|
|
93
|
+
isPersonal={isPersonal}
|
|
87
94
|
/>
|
|
88
95
|
<QuestionSectionAction>
|
|
89
96
|
{selectedResponse?.recording?.url && (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
QuestionSection,
|
|
4
4
|
QuestionSectionAction,
|
|
@@ -13,7 +13,7 @@ import ResponseAudioV2 from "../components/responseAudio.v2";
|
|
|
13
13
|
import QuestionDropdown from "../components/questionDropdown";
|
|
14
14
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
15
15
|
import wordStore from "../../../../mc/wordStore.json";
|
|
16
|
-
const EssayScripted = ({ data, aiData, setToggle, answerData }) => {
|
|
16
|
+
const EssayScripted = ({ data, aiData, setToggle, answerData, isPersonal }) => {
|
|
17
17
|
const { findText } = useTranslation(wordStore);
|
|
18
18
|
const [analysis, setAnalysis] = useState(null);
|
|
19
19
|
const { setupAnalysis, getTrabScriptData } = useReportUtils();
|
|
@@ -25,7 +25,7 @@ const EssayScripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
25
25
|
const models = setupAnalysis(
|
|
26
26
|
aiData,
|
|
27
27
|
answerData?.answer?.data?.data?.recording,
|
|
28
|
-
answerData?.ai_score
|
|
28
|
+
answerData?.ai_score
|
|
29
29
|
);
|
|
30
30
|
setAnalysis(models);
|
|
31
31
|
}
|
|
@@ -46,7 +46,10 @@ const EssayScripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
46
46
|
</>
|
|
47
47
|
</QuestionDropdown>
|
|
48
48
|
<TitleAndSubtitle className="with-border">
|
|
49
|
-
<Response
|
|
49
|
+
<Response
|
|
50
|
+
response={answerData?.answer?.data?.data?.text}
|
|
51
|
+
isPersonal={isPersonal}
|
|
52
|
+
/>
|
|
50
53
|
</TitleAndSubtitle>
|
|
51
54
|
|
|
52
55
|
<QuestionSectionWithAnalysis>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
QuestionSection,
|
|
4
4
|
QuestionSectionAction,
|
|
@@ -12,7 +12,13 @@ import QuestionDropdown from "../components/questionDropdown";
|
|
|
12
12
|
import ResponseAudioV2 from "../components/responseAudio.v2";
|
|
13
13
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
14
14
|
import wordStore from "../../../../mc/wordStore.json";
|
|
15
|
-
const EssayUnscripted = ({
|
|
15
|
+
const EssayUnscripted = ({
|
|
16
|
+
data,
|
|
17
|
+
aiData,
|
|
18
|
+
setToggle,
|
|
19
|
+
answerData,
|
|
20
|
+
isPersonal,
|
|
21
|
+
}) => {
|
|
16
22
|
const { findText } = useTranslation(wordStore);
|
|
17
23
|
const [analysis, setAnalysis] = useState(null);
|
|
18
24
|
const { setupAnalysis, getTrabScriptData } = useReportUtils();
|
|
@@ -21,7 +27,7 @@ const EssayUnscripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
21
27
|
const models = setupAnalysis(
|
|
22
28
|
aiData,
|
|
23
29
|
answerData?.answer?.data?.data?.recording,
|
|
24
|
-
answerData?.ai_score
|
|
30
|
+
answerData?.ai_score
|
|
25
31
|
);
|
|
26
32
|
setAnalysis(models);
|
|
27
33
|
}
|
|
@@ -51,6 +57,7 @@ const EssayUnscripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
51
57
|
: undefined
|
|
52
58
|
}
|
|
53
59
|
isAiWordFlow
|
|
60
|
+
isPersonal={isPersonal}
|
|
54
61
|
defaultError={!answerData?.answer?.data?.data?.recording}
|
|
55
62
|
/>
|
|
56
63
|
<QuestionSectionAction>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
QuestionSection,
|
|
4
4
|
QuestionSectionAction,
|
|
@@ -11,7 +11,8 @@ import useReportUtils from "../../hooks/useRreportUtils";
|
|
|
11
11
|
import QuestionDropdown from "../components/questionDropdown";
|
|
12
12
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
13
13
|
import wordStore from "../../../../mc/wordStore.json";
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
const EssayWritten = ({ data, aiData, setToggle, answerData, isPersonal }) => {
|
|
15
16
|
const { findText } = useTranslation(wordStore);
|
|
16
17
|
const [analysis, setAnalysis] = useState(null);
|
|
17
18
|
const { setupAnalysis } = useReportUtils();
|
|
@@ -37,7 +38,10 @@ const EssayWritten = ({ data, aiData, setToggle, answerData }) => {
|
|
|
37
38
|
</QuestionDropdown>
|
|
38
39
|
|
|
39
40
|
<QuestionSectionWithAnalysis>
|
|
40
|
-
<Response
|
|
41
|
+
<Response
|
|
42
|
+
response={data?.answer?.data?.data?.text}
|
|
43
|
+
isPersonal={isPersonal}
|
|
44
|
+
/>
|
|
41
45
|
<QuestionSectionAction>
|
|
42
46
|
{analysis?.models?.length > 0 && (
|
|
43
47
|
<AnalysisButton
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from
|
|
1
|
+
import React, { useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
QuestionSection,
|
|
4
4
|
MatchPairGrid,
|
|
@@ -14,7 +14,7 @@ import QuestionDropdown from "../components/questionDropdown";
|
|
|
14
14
|
import Response from "../components/response";
|
|
15
15
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
16
16
|
import wordStore from "../../../../mc/wordStore.json";
|
|
17
|
-
const MatchPair = ({ data, answerData }) => {
|
|
17
|
+
const MatchPair = ({ data, answerData, isPersonal }) => {
|
|
18
18
|
const { findText } = useTranslation(wordStore);
|
|
19
19
|
const [pairPreview, setPairPreview] = useState(null);
|
|
20
20
|
const getMatchAndCorrectPair = () => {
|
|
@@ -54,7 +54,7 @@ const MatchPair = ({ data, answerData }) => {
|
|
|
54
54
|
</QuestionDropdown>
|
|
55
55
|
{answerData &&
|
|
56
56
|
!Object.values(answerData?.answer?.data?.responses || {})?.length >
|
|
57
|
-
0 && <Response title="" />}
|
|
57
|
+
0 && <Response title="" isPersonal={isPersonal} />}
|
|
58
58
|
<TitleAndSubtitle>
|
|
59
59
|
<MatchPairGrid>
|
|
60
60
|
<h3>Word/Sentence</h3>
|
|
@@ -73,8 +73,8 @@ const MatchPair = ({ data, answerData }) => {
|
|
|
73
73
|
|
|
74
74
|
<MatchPairItem
|
|
75
75
|
className={classNames({
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
"is-correct": item?.isCorrect && item?.answer,
|
|
77
|
+
"is-incorrect": !item?.isCorrect,
|
|
78
78
|
})}
|
|
79
79
|
>
|
|
80
80
|
<p className="truncate-3">{item?.answer}</p>
|
|
@@ -6,7 +6,7 @@ import QuestionDropdown from "../components/questionDropdown";
|
|
|
6
6
|
import QuizQuestion from "../components/quizQuestion";
|
|
7
7
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
8
8
|
import wordStore from "../../../../mc/wordStore.json";
|
|
9
|
-
const QuizMultipleChoice = ({ data, answerData }) => {
|
|
9
|
+
const QuizMultipleChoice = ({ data, answerData, isPersonal }) => {
|
|
10
10
|
const { findText } = useTranslation(wordStore);
|
|
11
11
|
const { choiceListAndAnswer } = useReportUtils();
|
|
12
12
|
const { options, answer, isCorrect, correctIndex, correctText } =
|
|
@@ -36,7 +36,11 @@ const QuizMultipleChoice = ({ data, answerData }) => {
|
|
|
36
36
|
</>
|
|
37
37
|
</QuestionDropdown>
|
|
38
38
|
<TitleAndSubtitle>
|
|
39
|
-
<Response
|
|
39
|
+
<Response
|
|
40
|
+
goodFallback={isCorrect}
|
|
41
|
+
fallbackMessage={answer?.text}
|
|
42
|
+
isPersonal={isPersonal}
|
|
43
|
+
/>
|
|
40
44
|
</TitleAndSubtitle>
|
|
41
45
|
|
|
42
46
|
{answerData?.answer?.data && (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
QuestionSection,
|
|
4
4
|
QuestionSectionAction,
|
|
@@ -15,7 +15,7 @@ import QuizQuestion from "../components/quizQuestion";
|
|
|
15
15
|
import ResponseAudioV2 from "../components/responseAudio.v2";
|
|
16
16
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
17
17
|
import wordStore from "../../../../mc/wordStore.json";
|
|
18
|
-
const QuizScripted = ({ data, aiData, setToggle, answerData }) => {
|
|
18
|
+
const QuizScripted = ({ data, aiData, setToggle, answerData, isPersonal }) => {
|
|
19
19
|
const { findText } = useTranslation(wordStore);
|
|
20
20
|
const [selected, setSelected] = useState(1);
|
|
21
21
|
const [analysis, setAnalysis] = useState(null);
|
|
@@ -36,7 +36,7 @@ const QuizScripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
36
36
|
const models = setupAnalysis(
|
|
37
37
|
selectedModel,
|
|
38
38
|
selectedResponse?.recording,
|
|
39
|
-
data?.ai_score
|
|
39
|
+
data?.ai_score
|
|
40
40
|
);
|
|
41
41
|
setAnalysis(models);
|
|
42
42
|
}
|
|
@@ -65,7 +65,7 @@ const QuizScripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
65
65
|
</>
|
|
66
66
|
</QuestionDropdown>
|
|
67
67
|
|
|
68
|
-
<Response response={selectedResponse?.text} />
|
|
68
|
+
<Response response={selectedResponse?.text} isPersonal={isPersonal} />
|
|
69
69
|
|
|
70
70
|
<QuestionSectionWithAnalysis>
|
|
71
71
|
{selectedResponse?.recording && (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
QuestionSection,
|
|
4
4
|
QuestionSectionAction,
|
|
@@ -15,7 +15,13 @@ import QuizQuestion from "../components/quizQuestion";
|
|
|
15
15
|
import ResponseAudioV2 from "../components/responseAudio.v2";
|
|
16
16
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
17
17
|
import wordStore from "../../../../mc/wordStore.json";
|
|
18
|
-
const QuizUnscripted = ({
|
|
18
|
+
const QuizUnscripted = ({
|
|
19
|
+
data,
|
|
20
|
+
aiData,
|
|
21
|
+
setToggle,
|
|
22
|
+
answerData,
|
|
23
|
+
isPersonal,
|
|
24
|
+
}) => {
|
|
19
25
|
const { findText } = useTranslation(wordStore);
|
|
20
26
|
const [selected, setSelected] = useState(1);
|
|
21
27
|
const { quizResponses, quixSelectedModel, setupAnalysis, getTrabScriptData } =
|
|
@@ -23,7 +29,7 @@ const QuizUnscripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
23
29
|
const [analysis, setAnalysis] = useState(null);
|
|
24
30
|
const quizList = quizResponses({
|
|
25
31
|
responses: answerData?.answer?.data?.data?.responses,
|
|
26
|
-
type:
|
|
32
|
+
type: "unscripted",
|
|
27
33
|
});
|
|
28
34
|
const selectionList = quizList?.map((item) => ({
|
|
29
35
|
value: item?.key,
|
|
@@ -37,7 +43,7 @@ const QuizUnscripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
37
43
|
const models = setupAnalysis(
|
|
38
44
|
selectedModel,
|
|
39
45
|
selectedResponse?.recording,
|
|
40
|
-
data?.ai_score
|
|
46
|
+
data?.ai_score
|
|
41
47
|
);
|
|
42
48
|
setAnalysis(models);
|
|
43
49
|
}
|
|
@@ -75,6 +81,7 @@ const QuizUnscripted = ({ data, aiData, setToggle, answerData }) => {
|
|
|
75
81
|
}
|
|
76
82
|
isAiWordFlow
|
|
77
83
|
defaultError={!selectedResponse?.recording}
|
|
84
|
+
isPersonal={isPersonal}
|
|
78
85
|
/>
|
|
79
86
|
<QuestionSectionAction>
|
|
80
87
|
{selectedResponse?.recording && (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
QuestionSection,
|
|
4
4
|
QuestionSectionAction,
|
|
@@ -12,7 +12,7 @@ import QuestionDropdown from "../components/questionDropdown";
|
|
|
12
12
|
import ResponseAudioV2 from "../components/responseAudio.v2";
|
|
13
13
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
14
14
|
import wordStore from "../../../../mc/wordStore.json";
|
|
15
|
-
const Reading = ({ data, aiData, setToggle, answerData }) => {
|
|
15
|
+
const Reading = ({ data, aiData, setToggle, answerData, isPersonal }) => {
|
|
16
16
|
const { findText } = useTranslation(wordStore);
|
|
17
17
|
const [analysis, setAnalysis] = useState(null);
|
|
18
18
|
const { setupAnalysis, getTrabScriptData } = useReportUtils();
|
|
@@ -21,13 +21,13 @@ const Reading = ({ data, aiData, setToggle, answerData }) => {
|
|
|
21
21
|
const models = setupAnalysis(
|
|
22
22
|
aiData,
|
|
23
23
|
answerData?.answer?.data?.recording,
|
|
24
|
-
answerData?.ai_score
|
|
24
|
+
answerData?.ai_score
|
|
25
25
|
);
|
|
26
26
|
setAnalysis(models);
|
|
27
27
|
}
|
|
28
28
|
}, [data, answerData]);
|
|
29
29
|
const transcript = getTrabScriptData(analysis?.models);
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
return (
|
|
32
32
|
<QuestionSection>
|
|
33
33
|
<QuestionDropdown>
|
|
@@ -52,6 +52,7 @@ const Reading = ({ data, aiData, setToggle, answerData }) => {
|
|
|
52
52
|
}
|
|
53
53
|
isAiWordFlow
|
|
54
54
|
defaultError={!answerData?.answer?.data?.recording}
|
|
55
|
+
isPersonal={isPersonal}
|
|
55
56
|
/>
|
|
56
57
|
<QuestionSectionAction>
|
|
57
58
|
{answerData?.answer?.data?.recording && (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
QuestionSection,
|
|
4
4
|
QuestionSectionAction,
|
|
@@ -12,7 +12,7 @@ import ResponseAudioV2 from "../components/responseAudio.v2";
|
|
|
12
12
|
import QuestionDropdown from "../components/questionDropdown";
|
|
13
13
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
14
14
|
import wordStore from "../../../../mc/wordStore.json";
|
|
15
|
-
const SoundPlay = ({ data, aiData, setToggle, answerData }) => {
|
|
15
|
+
const SoundPlay = ({ data, aiData, setToggle, answerData, isPersonal }) => {
|
|
16
16
|
const { findText } = useTranslation(wordStore);
|
|
17
17
|
const [analysis, setAnalysis] = useState(null);
|
|
18
18
|
const { setupAnalysis, getTrabScriptData } = useReportUtils();
|
|
@@ -21,7 +21,7 @@ const SoundPlay = ({ data, aiData, setToggle, answerData }) => {
|
|
|
21
21
|
const models = setupAnalysis(
|
|
22
22
|
aiData,
|
|
23
23
|
answerData?.answer?.data?.audio,
|
|
24
|
-
answerData?.ai_score
|
|
24
|
+
answerData?.ai_score
|
|
25
25
|
);
|
|
26
26
|
setAnalysis(models);
|
|
27
27
|
}
|
|
@@ -51,6 +51,7 @@ const SoundPlay = ({ data, aiData, setToggle, answerData }) => {
|
|
|
51
51
|
}
|
|
52
52
|
isAiWordFlow
|
|
53
53
|
defaultError={!answerData?.answer?.data?.audio}
|
|
54
|
+
isPersonal={isPersonal}
|
|
54
55
|
/>
|
|
55
56
|
<QuestionSectionAction>
|
|
56
57
|
{answerData?.answer?.data?.audio && (
|
package/src/components/reportsComponents/reportQuestions/questions/wordPlayMultipleChoice.jsx
CHANGED
|
@@ -8,7 +8,7 @@ import QuestionDropdown from "../components/questionDropdown";
|
|
|
8
8
|
import ResponseAudioV2 from "../components/responseAudio.v2";
|
|
9
9
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
10
10
|
import wordStore from "../../../../mc/wordStore.json";
|
|
11
|
-
const WordPlayMultipleChoice = ({ data, answerData }) => {
|
|
11
|
+
const WordPlayMultipleChoice = ({ data, answerData, isPersonal }) => {
|
|
12
12
|
const { findText } = useTranslation(wordStore);
|
|
13
13
|
const { choiceListAndAnswer } = useReportUtils();
|
|
14
14
|
const { options, answer, isCorrect, correctIndex, correctText } =
|
|
@@ -42,7 +42,11 @@ const WordPlayMultipleChoice = ({ data, answerData }) => {
|
|
|
42
42
|
</QuestionDropdown>
|
|
43
43
|
|
|
44
44
|
<TitleAndSubtitle>
|
|
45
|
-
<Response
|
|
45
|
+
<Response
|
|
46
|
+
goodFallback={isCorrect}
|
|
47
|
+
fallbackMessage={answer?.text}
|
|
48
|
+
isPersonal={isPersonal}
|
|
49
|
+
/>
|
|
46
50
|
</TitleAndSubtitle>
|
|
47
51
|
|
|
48
52
|
{answerData?.answer?.data && (
|
|
@@ -6,7 +6,7 @@ import QuestionDropdown from "../components/questionDropdown";
|
|
|
6
6
|
import ResponseAudioV2 from "../components/responseAudio.v2";
|
|
7
7
|
import useTranslation from "../../../../hooks/useTranslation.jsx";
|
|
8
8
|
import wordStore from "../../../../mc/wordStore.json";
|
|
9
|
-
const WordPlayText = ({ data, answerData }) => {
|
|
9
|
+
const WordPlayText = ({ data, answerData, isPersonal }) => {
|
|
10
10
|
const { findText } = useTranslation(wordStore);
|
|
11
11
|
return (
|
|
12
12
|
<QuestionSection>
|
|
@@ -27,9 +27,11 @@ const WordPlayText = ({ data, answerData }) => {
|
|
|
27
27
|
</>
|
|
28
28
|
</QuestionDropdown>
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
<Response
|
|
31
|
+
response={answerData?.answer?.data?.answer_text}
|
|
32
|
+
isPersonal={isPersonal}
|
|
33
|
+
/>
|
|
34
|
+
|
|
33
35
|
{data?.question_data?.answer && (
|
|
34
36
|
<Response
|
|
35
37
|
title={findText("Correct response")}
|