catchup-library-web 1.13.2 → 1.14.1
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/dist/index.d.mts +13 -33
- package/dist/index.d.ts +13 -33
- package/dist/index.js +94 -191
- package/dist/index.mjs +93 -188
- package/package.json +1 -1
- package/src/components/activities/ActivityPreviewByAnswerData.tsx +10 -41
- package/src/components/activities/ActivityPreviewByData.tsx +8 -32
- package/src/properties/ActivityProperties.ts +2 -2
- package/src/utilization/CatchtivityUtilization.ts +78 -150
- package/src/utilization/IndividualModelUtilization.ts +8 -14
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
constructAnswerBasedOnData,
|
|
4
|
+
retrieveDifficultyByActivityTypeFromData,
|
|
5
|
+
} from "../../utilization/CatchtivityUtilization";
|
|
3
6
|
import DropdownActivityContent from "./DropdownActivityContent";
|
|
4
7
|
import FillInTheBlanksActivityContent from "./FillInTheBlanksActivityContent";
|
|
5
8
|
import GroupingActivityContent from "./GroupingActivityContent";
|
|
@@ -23,7 +26,7 @@ const ActivityPreviewByData = ({
|
|
|
23
26
|
typeOptionList,
|
|
24
27
|
showSolution,
|
|
25
28
|
showEvaluationRubric,
|
|
26
|
-
|
|
29
|
+
showDifficulty,
|
|
27
30
|
isFullScreen,
|
|
28
31
|
}: IActivityPreviewByDataProps) => {
|
|
29
32
|
const [key, setKey] = useState(new Date().getTime());
|
|
@@ -52,33 +55,6 @@ const ActivityPreviewByData = ({
|
|
|
52
55
|
}, [typeOptionList, lockedType]);
|
|
53
56
|
|
|
54
57
|
useEffect(() => {
|
|
55
|
-
const retrieveTaxonomyNameByActivityTypeFromData = (
|
|
56
|
-
type: string | null
|
|
57
|
-
) => {
|
|
58
|
-
let taxonomyMap = {
|
|
59
|
-
name: "",
|
|
60
|
-
};
|
|
61
|
-
if (type === "ORDERING") {
|
|
62
|
-
taxonomyMap = JSON.parse(data["orderingTaxonomyMap"]);
|
|
63
|
-
} else if (type === "DROPDOWN") {
|
|
64
|
-
taxonomyMap = JSON.parse(data["dropdownTaxonomyMap"]);
|
|
65
|
-
} else if (type === "MCSA") {
|
|
66
|
-
taxonomyMap = JSON.parse(data["MCSATaxonomyMap"]);
|
|
67
|
-
} else if (type === "MCMA") {
|
|
68
|
-
taxonomyMap = JSON.parse(data["MCMATaxonomyMap"]);
|
|
69
|
-
} else if (type === "MATCHING") {
|
|
70
|
-
taxonomyMap = JSON.parse(data["matchingTaxonomyMap"]);
|
|
71
|
-
} else if (type === "GROUPING") {
|
|
72
|
-
taxonomyMap = JSON.parse(data["groupingTaxonomyMap"]);
|
|
73
|
-
} else if (type === "FILL_IN_THE_BLANKS") {
|
|
74
|
-
taxonomyMap = JSON.parse(data["fillInTheBlanksTaxonomyMap"]);
|
|
75
|
-
} else if (type === "OPEN_ENDED") {
|
|
76
|
-
taxonomyMap = JSON.parse(data["openEndedTaxonomyMap"]);
|
|
77
|
-
} else if (type === "TRUE_FALSE") {
|
|
78
|
-
taxonomyMap = JSON.parse(data["trueFalseTaxonomyMap"]);
|
|
79
|
-
}
|
|
80
|
-
return taxonomyMap.name;
|
|
81
|
-
};
|
|
82
58
|
if (!data) return;
|
|
83
59
|
if (!typeOptionList) return;
|
|
84
60
|
if (typeOptionList.length === 0) return;
|
|
@@ -88,19 +64,19 @@ const ActivityPreviewByData = ({
|
|
|
88
64
|
(typeOption: any) => typeOption.id === lockedType
|
|
89
65
|
);
|
|
90
66
|
}
|
|
91
|
-
if (
|
|
67
|
+
if (showDifficulty) {
|
|
92
68
|
setOptionList(
|
|
93
69
|
currentTypeOptionList.map((typeOption: any) => ({
|
|
94
70
|
...typeOption,
|
|
95
71
|
subText: i18n.t(
|
|
96
|
-
|
|
72
|
+
retrieveDifficultyByActivityTypeFromData(typeOption.id, data)
|
|
97
73
|
),
|
|
98
74
|
}))
|
|
99
75
|
);
|
|
100
76
|
} else {
|
|
101
77
|
setOptionList(currentTypeOptionList);
|
|
102
78
|
}
|
|
103
|
-
}, [data, lockedType, typeOptionList,
|
|
79
|
+
}, [data, lockedType, typeOptionList, showDifficulty]);
|
|
104
80
|
|
|
105
81
|
if (!data) return;
|
|
106
82
|
const answer = constructAnswerBasedOnData(data);
|
|
@@ -223,7 +223,7 @@ export interface IActivityPreviewByDataProps {
|
|
|
223
223
|
showDescription: boolean;
|
|
224
224
|
lockedType: string;
|
|
225
225
|
typeOptionList: any[];
|
|
226
|
-
|
|
226
|
+
showDifficulty: boolean;
|
|
227
227
|
showSolution: boolean;
|
|
228
228
|
showEvaluationRubric: boolean;
|
|
229
229
|
isFullScreen: boolean;
|
|
@@ -237,7 +237,7 @@ export interface IActivityPreviewByAnswerDataProps {
|
|
|
237
237
|
typeOptionList?: any[];
|
|
238
238
|
showSolution?: boolean;
|
|
239
239
|
showEvaluationRubric?: boolean;
|
|
240
|
-
|
|
240
|
+
showDifficulty?: boolean;
|
|
241
241
|
isFullScreen?: boolean;
|
|
242
242
|
showCorrectAnswer?: boolean;
|
|
243
243
|
}
|
|
@@ -109,93 +109,6 @@ export const retrieveDurationInSecondsOptionList = () => {
|
|
|
109
109
|
];
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
export const retrieveTaxonomyType = () => {
|
|
113
|
-
return [
|
|
114
|
-
{
|
|
115
|
-
value: "BLOOM",
|
|
116
|
-
text: i18n.t("BLOOM"),
|
|
117
|
-
},
|
|
118
|
-
];
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export const retrieveTaxonomyGroupName = () => {
|
|
122
|
-
return [
|
|
123
|
-
{
|
|
124
|
-
type: "BLOOM",
|
|
125
|
-
value: "BLOOM",
|
|
126
|
-
text: i18n.t("BLOOM"),
|
|
127
|
-
},
|
|
128
|
-
];
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export const retrieveTaxonomyName = () => {
|
|
132
|
-
return [
|
|
133
|
-
{
|
|
134
|
-
stage: 1,
|
|
135
|
-
groupName: "BLOOM",
|
|
136
|
-
value: "REMEMBER",
|
|
137
|
-
text: i18n.t("REMEMBER"),
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
stage: 2,
|
|
141
|
-
groupName: "BLOOM",
|
|
142
|
-
value: "UNDERSTAND",
|
|
143
|
-
text: i18n.t("UNDERSTAND"),
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
stage: 3,
|
|
147
|
-
groupName: "BLOOM",
|
|
148
|
-
value: "APPLY",
|
|
149
|
-
text: i18n.t("APPLY"),
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
stage: 4,
|
|
153
|
-
groupName: "BLOOM",
|
|
154
|
-
value: "ANALYZE",
|
|
155
|
-
text: i18n.t("ANALYZE"),
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
stage: 5,
|
|
159
|
-
groupName: "BLOOM",
|
|
160
|
-
value: "EVALUATE",
|
|
161
|
-
text: i18n.t("EVALUATE"),
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
stage: 6,
|
|
165
|
-
groupName: "BLOOM",
|
|
166
|
-
value: "CREATE",
|
|
167
|
-
text: i18n.t("CREATE"),
|
|
168
|
-
},
|
|
169
|
-
];
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
// export const constructInputWithSpecialExpressionList = (inputText: string) => {
|
|
173
|
-
// const inputPartList = [];
|
|
174
|
-
// if (!inputText) return [];
|
|
175
|
-
// const splittedBold = inputText.split("**");
|
|
176
|
-
// let isBold = false;
|
|
177
|
-
// for (let i = 0; i < splittedBold.length; i++) {
|
|
178
|
-
// let isUnderline = false;
|
|
179
|
-
// const splittedUnderline = splittedBold[i].split("__");
|
|
180
|
-
// for (let j = 0; j < splittedUnderline.length; j++) {
|
|
181
|
-
// let isEquation = false;
|
|
182
|
-
// const splittedEquation = splittedUnderline[j].split("$$");
|
|
183
|
-
// for (let k = 0; k < splittedEquation.length; k++) {
|
|
184
|
-
// inputPartList.push({
|
|
185
|
-
// value: splittedEquation[k],
|
|
186
|
-
// isEquation,
|
|
187
|
-
// isUnderline,
|
|
188
|
-
// isBold,
|
|
189
|
-
// });
|
|
190
|
-
// isEquation = !isEquation;
|
|
191
|
-
// }
|
|
192
|
-
// isUnderline = !isUnderline;
|
|
193
|
-
// }
|
|
194
|
-
// isBold = !isBold;
|
|
195
|
-
// }
|
|
196
|
-
// return inputPartList;
|
|
197
|
-
// };
|
|
198
|
-
|
|
199
112
|
export const constructInputWithSpecialExpressionList = (inputText: string) => {
|
|
200
113
|
const inputPartList = [];
|
|
201
114
|
if (!inputText) return [];
|
|
@@ -1477,45 +1390,45 @@ export const findBestFitActivity = (
|
|
|
1477
1390
|
activity;
|
|
1478
1391
|
const parsedData = JSON.parse(data);
|
|
1479
1392
|
const {
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1393
|
+
orderingDifficulty,
|
|
1394
|
+
dropdownDifficulty,
|
|
1395
|
+
MCSADifficulty,
|
|
1396
|
+
MCMADifficulty,
|
|
1397
|
+
matchingDifficulty,
|
|
1398
|
+
groupingDifficulty,
|
|
1399
|
+
fillInTheBlanksDifficulty,
|
|
1400
|
+
openEndedDifficulty,
|
|
1401
|
+
trueFalseDifficulty,
|
|
1489
1402
|
} = parsedData;
|
|
1490
|
-
const
|
|
1491
|
-
if (
|
|
1492
|
-
|
|
1403
|
+
const difficultyMap: any = {};
|
|
1404
|
+
if (orderingDifficulty) {
|
|
1405
|
+
difficultyMap["orderingDifficulty"] = JSON.parse(orderingDifficulty);
|
|
1493
1406
|
}
|
|
1494
|
-
if (
|
|
1495
|
-
|
|
1407
|
+
if (dropdownDifficulty) {
|
|
1408
|
+
difficultyMap["dropdownDifficulty"] = JSON.parse(dropdownDifficulty);
|
|
1496
1409
|
}
|
|
1497
|
-
if (
|
|
1498
|
-
|
|
1410
|
+
if (MCSADifficulty) {
|
|
1411
|
+
difficultyMap["MCSADifficulty"] = JSON.parse(MCSADifficulty);
|
|
1499
1412
|
}
|
|
1500
|
-
if (
|
|
1501
|
-
|
|
1413
|
+
if (MCMADifficulty) {
|
|
1414
|
+
difficultyMap["MCMADifficulty"] = JSON.parse(MCMADifficulty);
|
|
1502
1415
|
}
|
|
1503
|
-
if (
|
|
1504
|
-
|
|
1416
|
+
if (matchingDifficulty) {
|
|
1417
|
+
difficultyMap["matchingDifficulty"] = JSON.parse(matchingDifficulty);
|
|
1505
1418
|
}
|
|
1506
|
-
if (
|
|
1507
|
-
|
|
1419
|
+
if (groupingDifficulty) {
|
|
1420
|
+
difficultyMap["groupingDifficulty"] = JSON.parse(groupingDifficulty);
|
|
1508
1421
|
}
|
|
1509
|
-
if (
|
|
1510
|
-
|
|
1511
|
-
|
|
1422
|
+
if (fillInTheBlanksDifficulty) {
|
|
1423
|
+
difficultyMap["fillInTheBlanksDifficulty"] = JSON.parse(
|
|
1424
|
+
fillInTheBlanksDifficulty
|
|
1512
1425
|
);
|
|
1513
1426
|
}
|
|
1514
|
-
if (
|
|
1515
|
-
|
|
1427
|
+
if (trueFalseDifficulty) {
|
|
1428
|
+
difficultyMap["trueFalseDifficulty"] = JSON.parse(trueFalseDifficulty);
|
|
1516
1429
|
}
|
|
1517
|
-
if (
|
|
1518
|
-
|
|
1430
|
+
if (openEndedDifficulty) {
|
|
1431
|
+
difficultyMap["openEndedDifficulty"] = JSON.parse(openEndedDifficulty);
|
|
1519
1432
|
}
|
|
1520
1433
|
let coterieField = "VERBAL";
|
|
1521
1434
|
if (
|
|
@@ -1550,40 +1463,28 @@ export const findBestFitActivity = (
|
|
|
1550
1463
|
const activityTemplateValueMap: any = {};
|
|
1551
1464
|
for (const activityTemplateDTO of activityTemplateDTOList) {
|
|
1552
1465
|
const { type } = activityTemplateDTO;
|
|
1553
|
-
let
|
|
1466
|
+
let currentDifficulty: string = "";
|
|
1554
1467
|
if (type === "ORDERING") {
|
|
1555
|
-
|
|
1468
|
+
currentDifficulty = difficultyMap["orderingDifficulty"];
|
|
1556
1469
|
} else if (type === "DROPDOWN") {
|
|
1557
|
-
|
|
1470
|
+
currentDifficulty = difficultyMap["dropdownDifficulty"];
|
|
1558
1471
|
} else if (type === "MCSA") {
|
|
1559
|
-
|
|
1472
|
+
currentDifficulty = difficultyMap["MCSADifficulty"];
|
|
1560
1473
|
} else if (type === "MCMA") {
|
|
1561
|
-
|
|
1474
|
+
currentDifficulty = difficultyMap["MCMADifficulty"];
|
|
1562
1475
|
} else if (type === "MATCHING") {
|
|
1563
|
-
|
|
1476
|
+
currentDifficulty = difficultyMap["matchingDifficulty"];
|
|
1564
1477
|
} else if (type === "GROUPING") {
|
|
1565
|
-
|
|
1478
|
+
currentDifficulty = difficultyMap["groupingDifficulty"];
|
|
1566
1479
|
} else if (type === "FILL_IN_THE_BLANKS") {
|
|
1567
|
-
|
|
1480
|
+
currentDifficulty = difficultyMap["fillInTheBlanksDifficulty"];
|
|
1568
1481
|
} else if (type === "OPEN_ENDED") {
|
|
1569
|
-
|
|
1482
|
+
currentDifficulty = difficultyMap["openEndedDifficulty"];
|
|
1570
1483
|
} else if (type === "TRUE_FALSE") {
|
|
1571
|
-
|
|
1484
|
+
currentDifficulty = difficultyMap["trueFalseDifficulty"];
|
|
1572
1485
|
}
|
|
1573
1486
|
|
|
1574
|
-
const
|
|
1575
|
-
type: taxonomyType,
|
|
1576
|
-
groupName: taxonomyGroupName,
|
|
1577
|
-
name: taxonomyName,
|
|
1578
|
-
} = currentTaxonomyMap;
|
|
1579
|
-
const taxonomyString =
|
|
1580
|
-
taxonomyType.toLowerCase() +
|
|
1581
|
-
taxonomyGroupName.toLowerCase().charAt(0).toUpperCase() +
|
|
1582
|
-
taxonomyGroupName.toLowerCase().substring(1) +
|
|
1583
|
-
taxonomyName.toLowerCase().charAt(0).toUpperCase() +
|
|
1584
|
-
taxonomyName.toLowerCase().substring(1);
|
|
1585
|
-
|
|
1586
|
-
const currentTaxonomyScore = foundModel[taxonomyString];
|
|
1487
|
+
const currentDifficultyScore = foundModel[currentDifficulty];
|
|
1587
1488
|
const splittedTypeList = type.split("_");
|
|
1588
1489
|
let activityTemplateString = "";
|
|
1589
1490
|
for (let i = 0; i < splittedTypeList.length; i++) {
|
|
@@ -1596,7 +1497,7 @@ export const findBestFitActivity = (
|
|
|
1596
1497
|
}
|
|
1597
1498
|
}
|
|
1598
1499
|
const currentActivityTemplateScore = foundModel[activityTemplateString];
|
|
1599
|
-
const currentScore =
|
|
1500
|
+
const currentScore = currentDifficultyScore * currentActivityTemplateScore;
|
|
1600
1501
|
activityTemplateValueMap[type] = currentScore;
|
|
1601
1502
|
if (currentScore < bestScore) {
|
|
1602
1503
|
bestScore = currentScore;
|
|
@@ -1948,7 +1849,7 @@ export const constructActivityData = (
|
|
|
1948
1849
|
bodyMap: any,
|
|
1949
1850
|
materialMap: any,
|
|
1950
1851
|
solutionMap: any,
|
|
1951
|
-
|
|
1852
|
+
difficulty: string,
|
|
1952
1853
|
evaluationRubricMap: any
|
|
1953
1854
|
) => {
|
|
1954
1855
|
const constructedData: any = {};
|
|
@@ -1964,7 +1865,7 @@ export const constructActivityData = (
|
|
|
1964
1865
|
convertToSolutionMapString("ORDERING", solutionMap)
|
|
1965
1866
|
);
|
|
1966
1867
|
constructedData["orderingMaterialMap"] = JSON.stringify(materialMap);
|
|
1967
|
-
constructedData["
|
|
1868
|
+
constructedData["orderingDifficulty"] = difficulty;
|
|
1968
1869
|
} else if (activityTemplateType === "DROPDOWN") {
|
|
1969
1870
|
constructedData["dropdownBodyMap"] = JSON.stringify(
|
|
1970
1871
|
convertToBodyMapString("DROPDOWN", bodyMap)
|
|
@@ -1983,7 +1884,7 @@ export const constructActivityData = (
|
|
|
1983
1884
|
constructedData["dropdownMaterialMap"] = JSON.stringify(
|
|
1984
1885
|
convertedDropdownMaterialMap
|
|
1985
1886
|
);
|
|
1986
|
-
constructedData["
|
|
1887
|
+
constructedData["dropdownDifficulty"] = difficulty;
|
|
1987
1888
|
} else if (activityTemplateType === "MCSA") {
|
|
1988
1889
|
constructedData["MCSABodyMap"] = JSON.stringify(
|
|
1989
1890
|
convertToBodyMapString("MCSA", bodyMap)
|
|
@@ -1998,7 +1899,7 @@ export const constructActivityData = (
|
|
|
1998
1899
|
constructedData["MCSAMaterialMap"] = JSON.stringify(
|
|
1999
1900
|
convertedMCSAMaterialMap
|
|
2000
1901
|
);
|
|
2001
|
-
constructedData["
|
|
1902
|
+
constructedData["MCSADifficulty"] = difficulty;
|
|
2002
1903
|
} else if (activityTemplateType === "MCMA") {
|
|
2003
1904
|
constructedData["MCMABodyMap"] = JSON.stringify(
|
|
2004
1905
|
convertToBodyMapString("MCMA", bodyMap)
|
|
@@ -2016,7 +1917,7 @@ export const constructActivityData = (
|
|
|
2016
1917
|
constructedData["MCMAMaterialMap"] = JSON.stringify(
|
|
2017
1918
|
convertedMCMAMaterialMap
|
|
2018
1919
|
);
|
|
2019
|
-
constructedData["
|
|
1920
|
+
constructedData["MCMADifficulty"] = difficulty;
|
|
2020
1921
|
} else if (activityTemplateType === "MATCHING") {
|
|
2021
1922
|
constructedData["matchingBodyMap"] = JSON.stringify(
|
|
2022
1923
|
convertToBodyMapString("MATCHING", bodyMap)
|
|
@@ -2033,7 +1934,7 @@ export const constructActivityData = (
|
|
|
2033
1934
|
constructedData["matchingMaterialMap"] = JSON.stringify(
|
|
2034
1935
|
convertedMatchingMaterialMap
|
|
2035
1936
|
);
|
|
2036
|
-
constructedData["
|
|
1937
|
+
constructedData["matchingDifficulty"] = difficulty;
|
|
2037
1938
|
} else if (activityTemplateType === "GROUPING") {
|
|
2038
1939
|
constructedData["groupingBodyMap"] = JSON.stringify(
|
|
2039
1940
|
convertToBodyMapString("GROUPING", bodyMap)
|
|
@@ -2050,7 +1951,7 @@ export const constructActivityData = (
|
|
|
2050
1951
|
constructedData["groupingMaterialMap"] = JSON.stringify(
|
|
2051
1952
|
convertedGroupingMaterialMap
|
|
2052
1953
|
);
|
|
2053
|
-
constructedData["
|
|
1954
|
+
constructedData["groupingDifficulty"] = difficulty;
|
|
2054
1955
|
} else if (activityTemplateType === "FILL_IN_THE_BLANKS") {
|
|
2055
1956
|
constructedData["fillInTheBlanksBodyMap"] = JSON.stringify(
|
|
2056
1957
|
convertToBodyMapString("FILL_IN_THE_BLANKS", bodyMap)
|
|
@@ -2070,7 +1971,7 @@ export const constructActivityData = (
|
|
|
2070
1971
|
constructedData["fillInTheBlanksMaterialMap"] = JSON.stringify(
|
|
2071
1972
|
convertedFillInTheBlanksMaterialMap
|
|
2072
1973
|
);
|
|
2073
|
-
constructedData["
|
|
1974
|
+
constructedData["fillInTheBlanksDifficulty"] = difficulty;
|
|
2074
1975
|
} else if (activityTemplateType === "OPEN_ENDED") {
|
|
2075
1976
|
constructedData["openEndedBodyMap"] = JSON.stringify(
|
|
2076
1977
|
convertToBodyMapString("OPEN_ENDED", bodyMap)
|
|
@@ -2083,7 +1984,7 @@ export const constructActivityData = (
|
|
|
2083
1984
|
);
|
|
2084
1985
|
constructedData["openEndedMaterialMap"] = JSON.stringify(materialMap);
|
|
2085
1986
|
|
|
2086
|
-
constructedData["
|
|
1987
|
+
constructedData["openEndedDifficulty"] = difficulty;
|
|
2087
1988
|
} else if (activityTemplateType === "TRUE_FALSE") {
|
|
2088
1989
|
constructedData["trueFalseBodyMap"] = JSON.stringify(
|
|
2089
1990
|
convertToBodyMapString("TRUE_FALSE", bodyMap)
|
|
@@ -2098,7 +1999,7 @@ export const constructActivityData = (
|
|
|
2098
1999
|
constructedData["trueFalseMaterialMap"] = JSON.stringify(
|
|
2099
2000
|
convertTrueFalseMaterialMap
|
|
2100
2001
|
);
|
|
2101
|
-
constructedData["
|
|
2002
|
+
constructedData["trueFalseDifficulty"] = difficulty;
|
|
2102
2003
|
}
|
|
2103
2004
|
return constructedData;
|
|
2104
2005
|
};
|
|
@@ -2389,3 +2290,30 @@ export const constructActivityItemListSolutionOnly = (solutionMap: any) => {
|
|
|
2389
2290
|
});
|
|
2390
2291
|
return itemList;
|
|
2391
2292
|
};
|
|
2293
|
+
|
|
2294
|
+
export const retrieveDifficultyByActivityTypeFromData = (
|
|
2295
|
+
type: string,
|
|
2296
|
+
data: any
|
|
2297
|
+
) => {
|
|
2298
|
+
let difficulty = "";
|
|
2299
|
+
if (type === "ORDERING") {
|
|
2300
|
+
difficulty = data["orderingDifficulty"];
|
|
2301
|
+
} else if (type === "DROPDOWN") {
|
|
2302
|
+
difficulty = data["dropdownDifficulty"];
|
|
2303
|
+
} else if (type === "MCSA") {
|
|
2304
|
+
difficulty = data["MCSADifficulty"];
|
|
2305
|
+
} else if (type === "MCMA") {
|
|
2306
|
+
difficulty = data["MCMADifficulty"];
|
|
2307
|
+
} else if (type === "MATCHING") {
|
|
2308
|
+
difficulty = data["matchingDifficulty"];
|
|
2309
|
+
} else if (type === "GROUPING") {
|
|
2310
|
+
difficulty = data["groupingDifficulty"];
|
|
2311
|
+
} else if (type === "FILL_IN_THE_BLANKS") {
|
|
2312
|
+
difficulty = data["fillInTheBlanksDifficulty"];
|
|
2313
|
+
} else if (type === "OPEN_ENDED") {
|
|
2314
|
+
difficulty = data["openEndedDifficulty"];
|
|
2315
|
+
} else if (type === "TRUE_FALSE") {
|
|
2316
|
+
difficulty = data["trueFalseDifficulty"];
|
|
2317
|
+
}
|
|
2318
|
+
return difficulty;
|
|
2319
|
+
};
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
const NUMBER_OF_ACTIVITY_TEMPLATE = 9;
|
|
2
|
-
const
|
|
3
|
-
const
|
|
2
|
+
const NUMBER_OF_DIFFICULTY = 3;
|
|
3
|
+
const INITIAL_DIFFICULTY_VALUE = 1 / NUMBER_OF_DIFFICULTY;
|
|
4
4
|
const INITIAL_TEMPLATE_VALUE = 1 / NUMBER_OF_ACTIVITY_TEMPLATE;
|
|
5
5
|
|
|
6
6
|
export const constructBaseVerbalIndvidualModel = (userId: any) => {
|
|
7
7
|
return {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
bloomBloomEvaluate: INITIAL_TAXONOMY_VALUE,
|
|
12
|
-
bloomBloomRemember: INITIAL_TAXONOMY_VALUE,
|
|
13
|
-
bloomBloomUnderstand: INITIAL_TAXONOMY_VALUE,
|
|
8
|
+
easy: INITIAL_DIFFICULTY_VALUE,
|
|
9
|
+
medium: INITIAL_DIFFICULTY_VALUE,
|
|
10
|
+
hard: INITIAL_DIFFICULTY_VALUE,
|
|
14
11
|
dropdown: INITIAL_TEMPLATE_VALUE,
|
|
15
12
|
coterieField: "VERBAL",
|
|
16
13
|
fillInTheBlanks: INITIAL_TEMPLATE_VALUE,
|
|
@@ -27,12 +24,9 @@ export const constructBaseVerbalIndvidualModel = (userId: any) => {
|
|
|
27
24
|
|
|
28
25
|
export const constructBaseNumericIndividualModel = (userId: any) => {
|
|
29
26
|
return {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
bloomBloomEvaluate: INITIAL_TAXONOMY_VALUE,
|
|
34
|
-
bloomBloomRemember: INITIAL_TAXONOMY_VALUE,
|
|
35
|
-
bloomBloomUnderstand: INITIAL_TAXONOMY_VALUE,
|
|
27
|
+
easy: INITIAL_DIFFICULTY_VALUE,
|
|
28
|
+
medium: INITIAL_DIFFICULTY_VALUE,
|
|
29
|
+
hard: INITIAL_DIFFICULTY_VALUE,
|
|
36
30
|
dropdown: INITIAL_TEMPLATE_VALUE,
|
|
37
31
|
coterieField: "NUMERIC",
|
|
38
32
|
fillInTheBlanks: INITIAL_TEMPLATE_VALUE,
|