catchup-library-web 2.2.14 → 2.2.15
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.js
CHANGED
|
@@ -7193,7 +7193,7 @@ var ActivityEvaluationRubricContent = ({
|
|
|
7193
7193
|
}
|
|
7194
7194
|
if (!evaluationRubricMap || Object.keys(evaluationRubricMap).length === 0)
|
|
7195
7195
|
return null;
|
|
7196
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.
|
|
7196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "p-4 border-catchup-gray-400 border-2 rounded-catchup-xlarge", children: [
|
|
7197
7197
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-xl font-bold text-center mb-3", children: i18n_default.t("evaluation_rubric") }),
|
|
7198
7198
|
Object.keys(evaluationRubricMap).map((key, index) => {
|
|
7199
7199
|
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
@@ -7223,7 +7223,7 @@ var ActivityEvaluationRubricContent = ({
|
|
|
7223
7223
|
) })
|
|
7224
7224
|
] }, `${key}_${index}`);
|
|
7225
7225
|
})
|
|
7226
|
-
] })
|
|
7226
|
+
] });
|
|
7227
7227
|
};
|
|
7228
7228
|
var ActivityEvaluationRubricContent_default = ActivityEvaluationRubricContent;
|
|
7229
7229
|
|
package/dist/index.mjs
CHANGED
|
@@ -6970,7 +6970,7 @@ var ActivityEvaluationRubricContent = ({
|
|
|
6970
6970
|
}
|
|
6971
6971
|
if (!evaluationRubricMap || Object.keys(evaluationRubricMap).length === 0)
|
|
6972
6972
|
return null;
|
|
6973
|
-
return /* @__PURE__ */
|
|
6973
|
+
return /* @__PURE__ */ jsxs34("div", { className: "p-4 border-catchup-gray-400 border-2 rounded-catchup-xlarge", children: [
|
|
6974
6974
|
/* @__PURE__ */ jsx45("p", { className: "text-xl font-bold text-center mb-3", children: i18n_default.t("evaluation_rubric") }),
|
|
6975
6975
|
Object.keys(evaluationRubricMap).map((key, index) => {
|
|
6976
6976
|
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
@@ -7000,7 +7000,7 @@ var ActivityEvaluationRubricContent = ({
|
|
|
7000
7000
|
) })
|
|
7001
7001
|
] }, `${key}_${index}`);
|
|
7002
7002
|
})
|
|
7003
|
-
] })
|
|
7003
|
+
] });
|
|
7004
7004
|
};
|
|
7005
7005
|
var ActivityEvaluationRubricContent_default = ActivityEvaluationRubricContent;
|
|
7006
7006
|
|
package/package.json
CHANGED
package/src/components/activities/evaluation-rubric-contents/ActivityEvaluationRubricContent.tsx
CHANGED
|
@@ -36,52 +36,50 @@ const ActivityEvaluationRubricContent = ({
|
|
|
36
36
|
return null;
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
|
-
<div className="
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
let evaluationRubric = value;
|
|
39
|
+
<div className="p-4 border-catchup-gray-400 border-2 rounded-catchup-xlarge">
|
|
40
|
+
<p className="text-xl font-bold text-center mb-3">
|
|
41
|
+
{i18n.t("evaluation_rubric")}
|
|
42
|
+
</p>
|
|
43
|
+
{Object.keys(evaluationRubricMap).map((key, index) => {
|
|
44
|
+
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
45
|
+
const { value } = currentItem;
|
|
46
|
+
const matchedRegex = value.match(/\[(\d+)\]\s*([\s\S]*)/);
|
|
47
|
+
let points = 0;
|
|
48
|
+
let evaluationRubric = value;
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
if (matchedRegex) {
|
|
51
|
+
points = parseFloat(matchedRegex[1]);
|
|
52
|
+
evaluationRubric = matchedRegex[2];
|
|
53
|
+
}
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</div>
|
|
61
|
-
<p className="flex-1 text-xl whitespace-pre-wrap">
|
|
62
|
-
{constructInputWithSpecialExpressionList(evaluationRubric).map(
|
|
63
|
-
(inputPart, inputIndex) => (
|
|
64
|
-
<span
|
|
65
|
-
key={inputIndex}
|
|
66
|
-
className={`${inputPart.isBold ? "font-bold" : ""} ${
|
|
67
|
-
inputPart.isUnderline ? "underline" : ""
|
|
68
|
-
}`}
|
|
69
|
-
>
|
|
70
|
-
{inputPart.isEquation ? (
|
|
71
|
-
<span className="text-xl">
|
|
72
|
-
<InlineMath math={inputPart.value} />
|
|
73
|
-
</span>
|
|
74
|
-
) : (
|
|
75
|
-
inputPart.value
|
|
76
|
-
)}
|
|
77
|
-
</span>
|
|
78
|
-
)
|
|
79
|
-
)}
|
|
80
|
-
</p>
|
|
55
|
+
return (
|
|
56
|
+
<div key={`${key}_${index}`} className="my-2 flex flex-row gap-x-3">
|
|
57
|
+
<div className="font-bold text-xl whitespace-nowrap">
|
|
58
|
+
{points} {i18n.t("points")}
|
|
81
59
|
</div>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
60
|
+
<p className="flex-1 text-xl whitespace-pre-wrap">
|
|
61
|
+
{constructInputWithSpecialExpressionList(evaluationRubric).map(
|
|
62
|
+
(inputPart, inputIndex) => (
|
|
63
|
+
<span
|
|
64
|
+
key={inputIndex}
|
|
65
|
+
className={`${inputPart.isBold ? "font-bold" : ""} ${
|
|
66
|
+
inputPart.isUnderline ? "underline" : ""
|
|
67
|
+
}`}
|
|
68
|
+
>
|
|
69
|
+
{inputPart.isEquation ? (
|
|
70
|
+
<span className="text-xl">
|
|
71
|
+
<InlineMath math={inputPart.value} />
|
|
72
|
+
</span>
|
|
73
|
+
) : (
|
|
74
|
+
inputPart.value
|
|
75
|
+
)}
|
|
76
|
+
</span>
|
|
77
|
+
)
|
|
78
|
+
)}
|
|
79
|
+
</p>
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
})}
|
|
85
83
|
</div>
|
|
86
84
|
);
|
|
87
85
|
};
|