@elice/material-quiz 1.240508.0-globalization.0 → 1.240514.0
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/cjs/components/material-quiz/MaterialQuiz.js +1 -5
- package/cjs/components/material-quiz/MaterialQuizAnswerExplanation.js +1 -3
- package/cjs/components/material-quiz/MaterialQuizSelectMultiple.js +1 -3
- package/cjs/components/material-quiz/MaterialQuizSelectMultipleOrder.js +1 -3
- package/cjs/components/material-quiz/MaterialQuizSelectOne.js +1 -3
- package/cjs/components/material-quiz/MaterialQuizText.js +1 -3
- package/cjs/components/material-quiz/QuizResultBadge.js +1 -3
- package/cjs/components/material-quiz/QuizSubmitStatusText.js +1 -3
- package/cjs/components/material-quiz/locales/th.json.js +1 -1
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +1 -3
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupDesktop.js +1 -3
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupMobile.js +1 -3
- package/cjs/components/material-quiz-edit/MaterialQuizEdit.js +1 -5
- package/cjs/components/material-quiz-edit/MaterialQuizEditContent.js +1 -3
- package/cjs/components/material-quiz-edit/locales/th.json.js +1 -1
- package/cjs/components/material-quiz-edit/options/OptionSelectMultiple.js +1 -3
- package/cjs/components/material-quiz-edit/options/OptionSelectMultipleOrder.js +1 -3
- package/cjs/components/material-quiz-edit/options/OptionSelectOne.js +1 -3
- package/cjs/components/material-quiz-edit/options/OptionText.js +1 -3
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupAnswerInfo.js +1 -3
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupAnswerListItem.js +1 -3
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupGroupInfo.js +1 -3
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupGroupListItem.js +1 -3
- package/cjs/components/shared/QuestionBox.js +1 -3
- package/es/components/material-quiz/MaterialQuiz.js +1 -5
- package/es/components/material-quiz/MaterialQuizAnswerExplanation.js +1 -3
- package/es/components/material-quiz/MaterialQuizSelectMultiple.js +1 -3
- package/es/components/material-quiz/MaterialQuizSelectMultipleOrder.js +1 -3
- package/es/components/material-quiz/MaterialQuizSelectOne.js +1 -3
- package/es/components/material-quiz/MaterialQuizText.js +1 -3
- package/es/components/material-quiz/QuizResultBadge.js +1 -3
- package/es/components/material-quiz/QuizSubmitStatusText.js +1 -3
- package/es/components/material-quiz/locales/th.json.js +1 -1
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +1 -3
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupDesktop.js +1 -3
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupMobile.js +1 -3
- package/es/components/material-quiz-edit/MaterialQuizEdit.js +1 -5
- package/es/components/material-quiz-edit/MaterialQuizEditContent.js +1 -3
- package/es/components/material-quiz-edit/locales/th.json.js +1 -1
- package/es/components/material-quiz-edit/options/OptionSelectMultiple.js +1 -3
- package/es/components/material-quiz-edit/options/OptionSelectMultipleOrder.js +1 -3
- package/es/components/material-quiz-edit/options/OptionSelectOne.js +1 -3
- package/es/components/material-quiz-edit/options/OptionText.js +1 -3
- package/es/components/material-quiz-edit/options/options-group/OptionGroupAnswerInfo.js +1 -3
- package/es/components/material-quiz-edit/options/options-group/OptionGroupAnswerListItem.js +1 -3
- package/es/components/material-quiz-edit/options/options-group/OptionGroupGroupInfo.js +1 -3
- package/es/components/material-quiz-edit/options/options-group/OptionGroupGroupListItem.js +1 -3
- package/es/components/shared/QuestionBox.js +1 -3
- package/package.json +6 -6
|
@@ -91,11 +91,7 @@ const MaterialQuizContainer = ({
|
|
|
91
91
|
onNext,
|
|
92
92
|
__intl
|
|
93
93
|
}) => {
|
|
94
|
-
return React.createElement(intl.RawEliceIntlProvider, {
|
|
95
|
-
value: {
|
|
96
|
-
intl: __intl
|
|
97
|
-
}
|
|
98
|
-
}, React.createElement(MaterialQuizContext.MaterialQuizProvider, {
|
|
94
|
+
return React.createElement(intl.RawEliceIntlProvider, Object.assign({}, __intl), React.createElement(MaterialQuizContext.MaterialQuizProvider, {
|
|
99
95
|
materialQuizId: materialQuizId,
|
|
100
96
|
userId: userId,
|
|
101
97
|
onDirty: onDirty,
|
|
@@ -22,9 +22,7 @@ const MaterialQuizAnswerExplanation = () => {
|
|
|
22
22
|
lecture,
|
|
23
23
|
materialQuiz
|
|
24
24
|
} = MaterialQuizContext.useMaterialQuizState();
|
|
25
|
-
const
|
|
26
|
-
intl: intl$1
|
|
27
|
-
} = intl.useRawEliceIntl();
|
|
25
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
28
26
|
if (!materialQuiz || !materialQuiz.explanationInfo.isEnabled || !materialQuiz.isResponded || (lecture === null || lecture === void 0 ? void 0 : lecture.lectureType) === types.enums.LectureType.Test && (lecture === null || lecture === void 0 ? void 0 : lecture.testUserStatus) !== types.enums.LectureTestUserStatus.Completed) {
|
|
29
27
|
return null;
|
|
30
28
|
}
|
|
@@ -33,9 +33,7 @@ const MaterialQuizSelectMultiple = () => {
|
|
|
33
33
|
onDirty
|
|
34
34
|
} = MaterialQuizContext.useMaterialQuizDispatch();
|
|
35
35
|
// state
|
|
36
|
-
const
|
|
37
|
-
intl: intl$1
|
|
38
|
-
} = intl.useRawEliceIntl();
|
|
36
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
39
37
|
const [selectedAnswer, setSelectedAnswer] = React.useState([]);
|
|
40
38
|
const [materialQuizResponse, setMaterialQuizResponse] = React.useState();
|
|
41
39
|
const [submitStatus, setSubmitStatus] = React.useState('idle');
|
|
@@ -71,9 +71,7 @@ const MaterialQuizSelectMultipleOrder = () => {
|
|
|
71
71
|
onDirty
|
|
72
72
|
} = MaterialQuizContext.useMaterialQuizDispatch();
|
|
73
73
|
// state
|
|
74
|
-
const
|
|
75
|
-
intl: intl$1
|
|
76
|
-
} = intl.useRawEliceIntl();
|
|
74
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
77
75
|
const [materialQuizResponse, setMaterialQuizResponse] = React.useState();
|
|
78
76
|
const [submitStatus, setSubmitStatus] = React.useState('idle');
|
|
79
77
|
const [isActive, setIsActive] = React.useState(false);
|
|
@@ -33,9 +33,7 @@ const MaterialQuizSelectOne = () => {
|
|
|
33
33
|
onDirty
|
|
34
34
|
} = MaterialQuizContext.useMaterialQuizDispatch();
|
|
35
35
|
// state
|
|
36
|
-
const
|
|
37
|
-
intl: intl$1
|
|
38
|
-
} = intl.useRawEliceIntl();
|
|
36
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
39
37
|
const [selectedAnswer, setSelectedAnswer] = React.useState();
|
|
40
38
|
const [materialQuizResponse, setMaterialQuizResponse] = React.useState();
|
|
41
39
|
const [submitStatus, setSubmitStatus] = React.useState('idle');
|
|
@@ -36,9 +36,7 @@ const MaterialQuizText = () => {
|
|
|
36
36
|
onDirty
|
|
37
37
|
} = MaterialQuizContext.useMaterialQuizDispatch();
|
|
38
38
|
// state
|
|
39
|
-
const
|
|
40
|
-
intl: intl$1
|
|
41
|
-
} = intl.useRawEliceIntl();
|
|
39
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
42
40
|
const [materialQuizResponse, setMaterialQuizResponse] = React.useState();
|
|
43
41
|
const [submitStatus, setSubmitStatus] = React.useState('idle');
|
|
44
42
|
const [answer, setAnswer] = React.useState('');
|
|
@@ -10,9 +10,7 @@ var index = require('../../helpers/index.js');
|
|
|
10
10
|
const QuizResultBadge = ({
|
|
11
11
|
materialQuizResponse
|
|
12
12
|
}) => {
|
|
13
|
-
const
|
|
14
|
-
intl: intl$1
|
|
15
|
-
} = intl.useRawEliceIntl();
|
|
13
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
16
14
|
const status = React.useMemo(() => index.getQuizResultStatus(materialQuizResponse), [materialQuizResponse]);
|
|
17
15
|
switch (status) {
|
|
18
16
|
case index.QuizResultStatus.Correct:
|
|
@@ -9,9 +9,7 @@ var intl = require('@elice/intl');
|
|
|
9
9
|
const QuizSubmitStatusText = ({
|
|
10
10
|
status
|
|
11
11
|
}) => {
|
|
12
|
-
const
|
|
13
|
-
intl: intl$1
|
|
14
|
-
} = intl.useRawEliceIntl();
|
|
12
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
15
13
|
switch (status) {
|
|
16
14
|
case 'resolved':
|
|
17
15
|
return React.createElement(blocks.StatusText, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var messageTh = {"materialQuiz.error":"
|
|
5
|
+
var messageTh = {"materialQuiz.error":"ไม่สามารถดึงควิซได้","materialQuiz.submit":"ส่งใบสมัคร","materialQuiz.submittedAnswer":"ฉันสามารถตอบคำถามเช่นนี้ได้","materialQuiz.answer":"ตอบ","materialQuiz.next":"คำถามถัดไป >","materialQuiz.selectOne.answer.title":"เลือกจากมุมมองด้านล่างนี้","materialQuiz.selectMultiple.answer.title":"เลือกจากรายการด้านล่าง (มีการเลือกที่ซ้ำซ้อน)","materialQuiz.selectMultipleOrder.answer.title":"ลากและวางคำตอบของคุณ","materialQuiz.text.answer.title":"กรุณากรอกคำตอบ","materialQuiz.empty.title":"ควิซกำลังเตรียมอยู่ตอนนี้","materialQuiz.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์ควิซ!","materialQuiz.survey.empty.title":"การสำรวจกำลังเตรียมการอยู่ค่ะ","materialQuiz.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialQuiz.submitStatus.success":"เสนอ","materialQuiz.submitStatus.failure":"การส่งล้มเหลว","materialQuiz.resultStatus.correct":"ถูกต้อง","materialQuiz.resultStatus.wrong":"ผิด","materialQuiz.resultStatus.submitted":"เสนอ","materialQuiz.explanation.close":"ปิดคำอธิบายควิซ","materialQuiz.explanation.show":"แสดงคำอธิบายของควิซ","materialQuiz.explanation.empty":"ไม่ให้อธิบาย","materialQuiz.text.placeholder":"กรุณากรอกคำตอบ","materialQuiz.text.correct":"ถูกต้อง!","materialQuiz.text.wrong":"นั่นผิด ลองอีกครั้ง!","materialQuiz.order.answerEmpty":"คุณสามารถย้ายตัวเลือกกลับมาที่นี่ได้","materialQuiz.bottomSheet.title":"ตัวเลือก","materialQuiz.bottomSheet.optionEmpty":"ทุกมุมมองได้ถูกวางไว้ในกลุ่มแล้ว","materialQuiz.dropzone.desktop.answerEmpty":"ลากมุมมองเข้าสู่พื้นที่","materialQuiz.dropzone.mobile.answerEmpty":"คลิกที่นี่เพื่อเพิ่มมุมมอง","materialQuiz.dropzone.optionEmpty":"ตัวเลือก","materialQuiz.dropzone.optionReset":"รีเซ็ตคำตอบ"};
|
|
6
6
|
|
|
7
7
|
exports.default = messageTh;
|
|
@@ -24,9 +24,7 @@ var MaterialQuizGroupMobile = require('./MaterialQuizGroupMobile.js');
|
|
|
24
24
|
//
|
|
25
25
|
//
|
|
26
26
|
const MaterialQuizGroup = () => {
|
|
27
|
-
const
|
|
28
|
-
intl: intl$1
|
|
29
|
-
} = intl.useRawEliceIntl();
|
|
27
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
30
28
|
// context
|
|
31
29
|
const {
|
|
32
30
|
materialQuiz,
|
|
@@ -34,9 +34,7 @@ const StyledQuizOptionsDropzone = styled(EbDroppable.default).withConfig({
|
|
|
34
34
|
componentId: "sc-18trt81-4"
|
|
35
35
|
})(["display:flex;flex-wrap:wrap;gap:1rem;min-height:10.25rem;border-radius:0.5rem;outline:1px dashed ", ";&.ui-droppable-hover{outline:1px dashed ", ";}"], designTokens.base.color.navy4, designTokens.base.color.gray4);
|
|
36
36
|
const MaterialQuizGroupDesktop = () => {
|
|
37
|
-
const
|
|
38
|
-
intl: intl$1
|
|
39
|
-
} = intl.useRawEliceIntl();
|
|
37
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
40
38
|
const {
|
|
41
39
|
userId
|
|
42
40
|
} = MaterialQuizContext.useMaterialQuizState();
|
|
@@ -29,9 +29,7 @@ const StyledBottomSheetWrapper = styled(StyledQuizOptionList).withConfig({
|
|
|
29
29
|
isCurrentOptionList
|
|
30
30
|
}) => vertical && isCurrentOptionList ? 'flex-start' : 'center');
|
|
31
31
|
const MaterialQuizGroupMobile = () => {
|
|
32
|
-
const
|
|
33
|
-
intl: intl$1
|
|
34
|
-
} = intl.useRawEliceIntl();
|
|
32
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
35
33
|
// context
|
|
36
34
|
const {
|
|
37
35
|
materialQuiz,
|
|
@@ -77,11 +77,7 @@ const MaterialQuizEdit = React.forwardRef(({
|
|
|
77
77
|
//
|
|
78
78
|
//
|
|
79
79
|
//
|
|
80
|
-
return React.createElement(intl.RawEliceIntlProvider, {
|
|
81
|
-
value: {
|
|
82
|
-
intl: __intl
|
|
83
|
-
}
|
|
84
|
-
}, React.createElement("form", {
|
|
80
|
+
return React.createElement(intl.RawEliceIntlProvider, Object.assign({}, __intl), React.createElement("form", {
|
|
85
81
|
ref: formElRef
|
|
86
82
|
}, React.createElement(context.default.Provider, {
|
|
87
83
|
value: {
|
|
@@ -23,9 +23,7 @@ var context = require('./context.js');
|
|
|
23
23
|
const MIN_TEXT_LENGTH = 1;
|
|
24
24
|
const MAX_TEXT_LENGTH = 128;
|
|
25
25
|
const MaterialQuizEditContent = () => {
|
|
26
|
-
const
|
|
27
|
-
intl: intl$1
|
|
28
|
-
} = intl.useRawEliceIntl();
|
|
26
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
29
27
|
const {
|
|
30
28
|
disabled,
|
|
31
29
|
onFileUploadRequest
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var messageTh = {"common.option":"ตัวเลือก {number}","common.group":"กลุ่ม {group}","common.errorMessage.range":"
|
|
5
|
+
var messageTh = {"common.option":"ตัวเลือก {number}","common.group":"กลุ่ม {group}","common.errorMessage.range":"กรุณากรอกภายใน {min} ~ {max} ตัวอักษร","content.title":"คำถาม","content.title.errorMessage.required":"กรุณากรอกคำถาม","content.title.placeholder":"กรุณากรอกคำถามสำหรับปัญหานี้ค่ะ","content.description.title":"คำอธิบายของปัญหา","content.description.placeholder":"กรุณากรอกคำอธิบายปัญหาอย่างละเอียดพร้อมโค้ดหรือรูปภาพ เป็นต้น","content.option.title":"ตอบ","content.option.tooltip.disabled":"การแก้ไขไม่สามารถทำได้ถ้าควิซเป็นสาธารณะหรือถ้ามีนักเรียนที่ส่งปัญหาไปแล้ว {_termPathRoleStudent} คุณสามารถตรวจสอบปัญหาที่กำหนดค่าไว้ในแท็บ {_termLibraryLecturePage} ของผู้เรียนทางซ้ายได้เลย","content.option.select.items.selectOne":"การเลือกคำตอบหลายตัวเลือก (เลือกได้เพียงหนึ่งคำตอบ)","content.option.select.items.selectMultiple":"ตัวเลือกหลายตัวเลือก (ตอบได้หลายตัวเลือก)","content.option.select.items.selectMultipleOrder":"ลากและวาง","content.option.select.items.text":"อาการที่เป็นเรื่องส่วนบุคคล","content.option.optionsSetEnabled.label":"สับเปลี่ยนลำดับคำตอบ","content.option.optionsSetEnabled.tooltip":"เมื่อเปิดใช้งานคุณลักษณะนี้ ลำดับของคำตอบจะถูกสลับสลายสำหรับแต่ละ {_termPathRoleStudent}","content.option.alert.randomized.title":"การสับเปลี่ยนลำดับของคำตอบถูกเปิดใช้งาน","content.option.alert.randomized.description":"{_termPathRoleStudent} จะเห็นการเรียงลำดับของคำตอบของพวกเขาที่สลับกัน","content.option.select.items.group":"ลากและวาง (ประเภทกลุ่ม)","content.option.statusText.dragNDrop":"หลังจากป้อนตัวเลือกเสร็จ ให้คลิกตามลำดับของคำตอบที่ถูกต้อง\nคุณสามารถเช็คปัญหาที่กำหนดค่าไว้ได้ในแท็บ {_termLibraryLecturePage} ทางซ้าย","content.option.statusText.dragNDropGroup":"คุณสามารถตรวจสอบปัญหาที่กำหนดค่าไว้ในแท็บ {_termLibraryLecturePage} ของผู้เรียนทางด้านซ้ายได้","content.option.errorMessage.required":"โปรดเลือกคำตอบ","content.answerHint.title":"ระบุข้อความในช่องข้อมูลที่แสดงคำใบ้","content.answerHint.description":"คุณสามารถระบุข้อความใบ้สำหรับช่องป้อนที่จะใส่คำตอบได้","content.answerHint.placeholder":"ป้อนข้อความในช่องใส่ข้อมูล","content.explanationInfo.title":"เขียนอธิบาย","content.explanationInfo.description":"คำอธิบายนี้จะปรากฏหลังจากปัญหาได้รับการแก้ไขแล้ว","content.explanationInfo.checkbox.label":"ใช้","content.explanationInfo.textarea.placeholder":"กรุณาใส่คำอธิบาย","content.explanationInfo.textarea.errorMessage.required":"โปรดเขียนคำอธิบายเกี่ยวกับปัญหา","option.common.select.errorMessage.required":"กรุณากรอกตัวเลือก","option.common.select.placeholder":"ป้อนตัวเลือก","option.common.select.tooltip.minOptionInfoItem":"คุณต้องป้อนตัวเลือกอย่างน้อย 2 ตัวเลือก","option.common.select.tooltip.maxOptionInfoItem":"คุณไม่สามารถป้อนตัวเลือกได้มากกว่า 20 ตัวเลือก","option.common.select.addButton":"เพิ่มตัวเลือก","option.text.answerInfo.errorMessage.required":"กรุณากรอกคำตอบที่ถูกต้อง","option.text.answerInfo.hintText":"คำตอบจะถูกให้คะแนนโดยใช้ regular expressions หากคำตอบที่ถูกต้องรวมถึง meta-characters (^[]$()|*+?{}.\\) โปรดเติมเครื่องหมาย backslash (\\) ไว้ข้างหน้า","option.text.isAutoGrade.checkbox.label":"การให้คะแนนโดยการตรวจสอบโดยไม่ระบุคำตอบ","group.option.title":"กลุ่ม","group.option.addButton":"เพิ่มกลุ่ม","group.option.errorMessage.required":"กรุณาใส่ชื่อกลุ่ม","group.option.errorMessage.notChild":"มีกลุ่มที่ถูกสร้างขึ้นแล้ว ซึ่งไม่ได้อยู่ในตัวเลือกใดๆ ","group.option.tooltip.minDisabled":"คุณต้องกำหนดค่าอย่างน้อย 2 กลุ่ม","group.option.tooltip.maxDisabled":"คุณสามารถกำหนดค่ากลุ่มได้สูงสุด 6 กลุ่ม","answer.option.errorMessage":"ต้องมีตัวเลือกหรือค่าไฟล์","answer.option.title.text":"ตัวเลือก","answer.option.title.file":"ไฟล์","answer.option.title.group":"กลุ่มที่ตัวเลือกเป็นส่วนหนึ่งของ","answer.option.addButton":"เพิ่มตัวเลือก","answer.option.file.label":"อัพโหลดไฟล์","answer.option.file.description.imageSize":"อัตราส่วนที่แนะนำสำหรับไฟล์คือ 1:1 (185 x 185px)","answer.option.file.description.fileSize":"คุณสามารถอัพโหลดไฟล์ได้สูงสุด 3MB","answer.option.file.description.extension":"รองรับสกุลไฟล์ .mp3, .mp4, .mov, .png, .jpg, .svg และ .gif","answer.option.file.errorMessage.maxSize":"คุณสามารถอัพโหลดได้สูงสุด {size}MB.","answer.option.default.group":"ไม่มี","answer.option.tooltip.minDisabled":"คุณต้องกำหนดค่าอย่างน้อย 2 ตัวเลือก","answer.option.tooltip.maxDisabled":"คุณสามารถกำหนดค่าตั้งค่าได้สูงสุด 20 ตัวเลือก"};
|
|
6
6
|
|
|
7
7
|
exports.default = messageTh;
|
|
@@ -24,9 +24,7 @@ const StyledInputGroup = styled(blocks.SortableListGroup).withConfig({
|
|
|
24
24
|
componentId: "sc-1nbx9b8-1"
|
|
25
25
|
})(["width:100%;.em-option-editor{margin-bottom:0.5rem;&:last-of-type{margin-bottom:0;}}"]);
|
|
26
26
|
const OptionSelectMultiple = () => {
|
|
27
|
-
const
|
|
28
|
-
intl: intl$1
|
|
29
|
-
} = intl.useRawEliceIntl();
|
|
27
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
30
28
|
const {
|
|
31
29
|
disabled
|
|
32
30
|
} = context.useMaterialQuizEditContext();
|
|
@@ -24,9 +24,7 @@ const StyledInputGroup = styled(blocks.SortableListGroup).withConfig({
|
|
|
24
24
|
componentId: "sc-1xufc1p-1"
|
|
25
25
|
})(["width:100%;.em-option-editor{margin-bottom:0.5rem;&:last-of-type{margin-bottom:0;}}"]);
|
|
26
26
|
const OptionSelectMultipleOrder = () => {
|
|
27
|
-
const
|
|
28
|
-
intl: intl$1
|
|
29
|
-
} = intl.useRawEliceIntl();
|
|
27
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
30
28
|
const {
|
|
31
29
|
disabled
|
|
32
30
|
} = context.useMaterialQuizEditContext();
|
|
@@ -27,9 +27,7 @@ const StyledInputPrefixRadioOption = styled(blocks.RadioOption).withConfig({
|
|
|
27
27
|
componentId: "sc-vizer2-2"
|
|
28
28
|
})([".eb-radio-option__label{display:none;}"]);
|
|
29
29
|
const OptionSelectOne = () => {
|
|
30
|
-
const
|
|
31
|
-
intl: intl$1
|
|
32
|
-
} = intl.useRawEliceIntl();
|
|
30
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
33
31
|
const {
|
|
34
32
|
disabled
|
|
35
33
|
} = context.useMaterialQuizEditContext();
|
|
@@ -28,9 +28,7 @@ const StyledInput = /*#__PURE__*/_styled(blocks.Input, {
|
|
|
28
28
|
//
|
|
29
29
|
//
|
|
30
30
|
const OptionText = () => {
|
|
31
|
-
const
|
|
32
|
-
intl: intl$1
|
|
33
|
-
} = intl.useRawEliceIntl();
|
|
31
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
34
32
|
const {
|
|
35
33
|
disabled
|
|
36
34
|
} = context.useMaterialQuizEditContext();
|
|
@@ -62,9 +62,7 @@ const QuestionBox = _a => {
|
|
|
62
62
|
isNextActive
|
|
63
63
|
} = _a,
|
|
64
64
|
props = tslib.__rest(_a, ["children", "footerActions", "title", "titlePrefix", "submitResult", "submitStatus", "onNext", "isNextActive"]);
|
|
65
|
-
const
|
|
66
|
-
intl: intl$1
|
|
67
|
-
} = intl.useRawEliceIntl();
|
|
65
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
68
66
|
const {
|
|
69
67
|
vertical
|
|
70
68
|
} = MaterialQuizContext.useMaterialQuizState();
|
|
@@ -87,11 +87,7 @@ const MaterialQuizContainer = ({
|
|
|
87
87
|
onNext,
|
|
88
88
|
__intl
|
|
89
89
|
}) => {
|
|
90
|
-
return React.createElement(RawEliceIntlProvider, {
|
|
91
|
-
value: {
|
|
92
|
-
intl: __intl
|
|
93
|
-
}
|
|
94
|
-
}, React.createElement(MaterialQuizProvider, {
|
|
90
|
+
return React.createElement(RawEliceIntlProvider, Object.assign({}, __intl), React.createElement(MaterialQuizProvider, {
|
|
95
91
|
materialQuizId: materialQuizId,
|
|
96
92
|
userId: userId,
|
|
97
93
|
onDirty: onDirty,
|
|
@@ -18,9 +18,7 @@ const MaterialQuizAnswerExplanation = () => {
|
|
|
18
18
|
lecture,
|
|
19
19
|
materialQuiz
|
|
20
20
|
} = useMaterialQuizState();
|
|
21
|
-
const
|
|
22
|
-
intl
|
|
23
|
-
} = useRawEliceIntl();
|
|
21
|
+
const intl = useRawEliceIntl();
|
|
24
22
|
if (!materialQuiz || !materialQuiz.explanationInfo.isEnabled || !materialQuiz.isResponded || (lecture === null || lecture === void 0 ? void 0 : lecture.lectureType) === enums.LectureType.Test && (lecture === null || lecture === void 0 ? void 0 : lecture.testUserStatus) !== enums.LectureTestUserStatus.Completed) {
|
|
25
23
|
return null;
|
|
26
24
|
}
|
|
@@ -29,9 +29,7 @@ const MaterialQuizSelectMultiple = () => {
|
|
|
29
29
|
onDirty
|
|
30
30
|
} = useMaterialQuizDispatch();
|
|
31
31
|
// state
|
|
32
|
-
const
|
|
33
|
-
intl
|
|
34
|
-
} = useRawEliceIntl();
|
|
32
|
+
const intl = useRawEliceIntl();
|
|
35
33
|
const [selectedAnswer, setSelectedAnswer] = React.useState([]);
|
|
36
34
|
const [materialQuizResponse, setMaterialQuizResponse] = React.useState();
|
|
37
35
|
const [submitStatus, setSubmitStatus] = React.useState('idle');
|
|
@@ -67,9 +67,7 @@ const MaterialQuizSelectMultipleOrder = () => {
|
|
|
67
67
|
onDirty
|
|
68
68
|
} = useMaterialQuizDispatch();
|
|
69
69
|
// state
|
|
70
|
-
const
|
|
71
|
-
intl
|
|
72
|
-
} = useRawEliceIntl();
|
|
70
|
+
const intl = useRawEliceIntl();
|
|
73
71
|
const [materialQuizResponse, setMaterialQuizResponse] = React.useState();
|
|
74
72
|
const [submitStatus, setSubmitStatus] = React.useState('idle');
|
|
75
73
|
const [isActive, setIsActive] = React.useState(false);
|
|
@@ -29,9 +29,7 @@ const MaterialQuizSelectOne = () => {
|
|
|
29
29
|
onDirty
|
|
30
30
|
} = useMaterialQuizDispatch();
|
|
31
31
|
// state
|
|
32
|
-
const
|
|
33
|
-
intl
|
|
34
|
-
} = useRawEliceIntl();
|
|
32
|
+
const intl = useRawEliceIntl();
|
|
35
33
|
const [selectedAnswer, setSelectedAnswer] = React.useState();
|
|
36
34
|
const [materialQuizResponse, setMaterialQuizResponse] = React.useState();
|
|
37
35
|
const [submitStatus, setSubmitStatus] = React.useState('idle');
|
|
@@ -32,9 +32,7 @@ const MaterialQuizText = () => {
|
|
|
32
32
|
onDirty
|
|
33
33
|
} = useMaterialQuizDispatch();
|
|
34
34
|
// state
|
|
35
|
-
const
|
|
36
|
-
intl
|
|
37
|
-
} = useRawEliceIntl();
|
|
35
|
+
const intl = useRawEliceIntl();
|
|
38
36
|
const [materialQuizResponse, setMaterialQuizResponse] = React.useState();
|
|
39
37
|
const [submitStatus, setSubmitStatus] = React.useState('idle');
|
|
40
38
|
const [answer, setAnswer] = React.useState('');
|
|
@@ -6,9 +6,7 @@ import { getQuizResultStatus, QuizResultStatus } from '../../helpers/index.js';
|
|
|
6
6
|
const QuizResultBadge = ({
|
|
7
7
|
materialQuizResponse
|
|
8
8
|
}) => {
|
|
9
|
-
const
|
|
10
|
-
intl
|
|
11
|
-
} = useRawEliceIntl();
|
|
9
|
+
const intl = useRawEliceIntl();
|
|
12
10
|
const status = React.useMemo(() => getQuizResultStatus(materialQuizResponse), [materialQuizResponse]);
|
|
13
11
|
switch (status) {
|
|
14
12
|
case QuizResultStatus.Correct:
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var messageTh = {"materialQuiz.error":"
|
|
1
|
+
var messageTh = {"materialQuiz.error":"ไม่สามารถดึงควิซได้","materialQuiz.submit":"ส่งใบสมัคร","materialQuiz.submittedAnswer":"ฉันสามารถตอบคำถามเช่นนี้ได้","materialQuiz.answer":"ตอบ","materialQuiz.next":"คำถามถัดไป >","materialQuiz.selectOne.answer.title":"เลือกจากมุมมองด้านล่างนี้","materialQuiz.selectMultiple.answer.title":"เลือกจากรายการด้านล่าง (มีการเลือกที่ซ้ำซ้อน)","materialQuiz.selectMultipleOrder.answer.title":"ลากและวางคำตอบของคุณ","materialQuiz.text.answer.title":"กรุณากรอกคำตอบ","materialQuiz.empty.title":"ควิซกำลังเตรียมอยู่ตอนนี้","materialQuiz.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์ควิซ!","materialQuiz.survey.empty.title":"การสำรวจกำลังเตรียมการอยู่ค่ะ","materialQuiz.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialQuiz.submitStatus.success":"เสนอ","materialQuiz.submitStatus.failure":"การส่งล้มเหลว","materialQuiz.resultStatus.correct":"ถูกต้อง","materialQuiz.resultStatus.wrong":"ผิด","materialQuiz.resultStatus.submitted":"เสนอ","materialQuiz.explanation.close":"ปิดคำอธิบายควิซ","materialQuiz.explanation.show":"แสดงคำอธิบายของควิซ","materialQuiz.explanation.empty":"ไม่ให้อธิบาย","materialQuiz.text.placeholder":"กรุณากรอกคำตอบ","materialQuiz.text.correct":"ถูกต้อง!","materialQuiz.text.wrong":"นั่นผิด ลองอีกครั้ง!","materialQuiz.order.answerEmpty":"คุณสามารถย้ายตัวเลือกกลับมาที่นี่ได้","materialQuiz.bottomSheet.title":"ตัวเลือก","materialQuiz.bottomSheet.optionEmpty":"ทุกมุมมองได้ถูกวางไว้ในกลุ่มแล้ว","materialQuiz.dropzone.desktop.answerEmpty":"ลากมุมมองเข้าสู่พื้นที่","materialQuiz.dropzone.mobile.answerEmpty":"คลิกที่นี่เพื่อเพิ่มมุมมอง","materialQuiz.dropzone.optionEmpty":"ตัวเลือก","materialQuiz.dropzone.optionReset":"รีเซ็ตคำตอบ"};
|
|
2
2
|
|
|
3
3
|
export { messageTh as default };
|
|
@@ -30,9 +30,7 @@ const StyledQuizOptionsDropzone = styled(EbDroppable).withConfig({
|
|
|
30
30
|
componentId: "sc-18trt81-4"
|
|
31
31
|
})(["display:flex;flex-wrap:wrap;gap:1rem;min-height:10.25rem;border-radius:0.5rem;outline:1px dashed ", ";&.ui-droppable-hover{outline:1px dashed ", ";}"], base.color.navy4, base.color.gray4);
|
|
32
32
|
const MaterialQuizGroupDesktop = () => {
|
|
33
|
-
const
|
|
34
|
-
intl
|
|
35
|
-
} = useRawEliceIntl();
|
|
33
|
+
const intl = useRawEliceIntl();
|
|
36
34
|
const {
|
|
37
35
|
userId
|
|
38
36
|
} = useMaterialQuizState();
|
|
@@ -25,9 +25,7 @@ const StyledBottomSheetWrapper = styled(StyledQuizOptionList).withConfig({
|
|
|
25
25
|
isCurrentOptionList
|
|
26
26
|
}) => vertical && isCurrentOptionList ? 'flex-start' : 'center');
|
|
27
27
|
const MaterialQuizGroupMobile = () => {
|
|
28
|
-
const
|
|
29
|
-
intl
|
|
30
|
-
} = useRawEliceIntl();
|
|
28
|
+
const intl = useRawEliceIntl();
|
|
31
29
|
// context
|
|
32
30
|
const {
|
|
33
31
|
materialQuiz,
|
|
@@ -73,11 +73,7 @@ const MaterialQuizEdit = forwardRef(({
|
|
|
73
73
|
//
|
|
74
74
|
//
|
|
75
75
|
//
|
|
76
|
-
return React.createElement(RawEliceIntlProvider, {
|
|
77
|
-
value: {
|
|
78
|
-
intl: __intl
|
|
79
|
-
}
|
|
80
|
-
}, React.createElement("form", {
|
|
76
|
+
return React.createElement(RawEliceIntlProvider, Object.assign({}, __intl), React.createElement("form", {
|
|
81
77
|
ref: formElRef
|
|
82
78
|
}, React.createElement(MaterialQuizEditContext.Provider, {
|
|
83
79
|
value: {
|
|
@@ -19,9 +19,7 @@ import { useMaterialQuizEditContext } from './context.js';
|
|
|
19
19
|
const MIN_TEXT_LENGTH = 1;
|
|
20
20
|
const MAX_TEXT_LENGTH = 128;
|
|
21
21
|
const MaterialQuizEditContent = () => {
|
|
22
|
-
const
|
|
23
|
-
intl
|
|
24
|
-
} = useRawEliceIntl();
|
|
22
|
+
const intl = useRawEliceIntl();
|
|
25
23
|
const {
|
|
26
24
|
disabled,
|
|
27
25
|
onFileUploadRequest
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var messageTh = {"common.option":"ตัวเลือก {number}","common.group":"กลุ่ม {group}","common.errorMessage.range":"
|
|
1
|
+
var messageTh = {"common.option":"ตัวเลือก {number}","common.group":"กลุ่ม {group}","common.errorMessage.range":"กรุณากรอกภายใน {min} ~ {max} ตัวอักษร","content.title":"คำถาม","content.title.errorMessage.required":"กรุณากรอกคำถาม","content.title.placeholder":"กรุณากรอกคำถามสำหรับปัญหานี้ค่ะ","content.description.title":"คำอธิบายของปัญหา","content.description.placeholder":"กรุณากรอกคำอธิบายปัญหาอย่างละเอียดพร้อมโค้ดหรือรูปภาพ เป็นต้น","content.option.title":"ตอบ","content.option.tooltip.disabled":"การแก้ไขไม่สามารถทำได้ถ้าควิซเป็นสาธารณะหรือถ้ามีนักเรียนที่ส่งปัญหาไปแล้ว {_termPathRoleStudent} คุณสามารถตรวจสอบปัญหาที่กำหนดค่าไว้ในแท็บ {_termLibraryLecturePage} ของผู้เรียนทางซ้ายได้เลย","content.option.select.items.selectOne":"การเลือกคำตอบหลายตัวเลือก (เลือกได้เพียงหนึ่งคำตอบ)","content.option.select.items.selectMultiple":"ตัวเลือกหลายตัวเลือก (ตอบได้หลายตัวเลือก)","content.option.select.items.selectMultipleOrder":"ลากและวาง","content.option.select.items.text":"อาการที่เป็นเรื่องส่วนบุคคล","content.option.optionsSetEnabled.label":"สับเปลี่ยนลำดับคำตอบ","content.option.optionsSetEnabled.tooltip":"เมื่อเปิดใช้งานคุณลักษณะนี้ ลำดับของคำตอบจะถูกสลับสลายสำหรับแต่ละ {_termPathRoleStudent}","content.option.alert.randomized.title":"การสับเปลี่ยนลำดับของคำตอบถูกเปิดใช้งาน","content.option.alert.randomized.description":"{_termPathRoleStudent} จะเห็นการเรียงลำดับของคำตอบของพวกเขาที่สลับกัน","content.option.select.items.group":"ลากและวาง (ประเภทกลุ่ม)","content.option.statusText.dragNDrop":"หลังจากป้อนตัวเลือกเสร็จ ให้คลิกตามลำดับของคำตอบที่ถูกต้อง\nคุณสามารถเช็คปัญหาที่กำหนดค่าไว้ได้ในแท็บ {_termLibraryLecturePage} ทางซ้าย","content.option.statusText.dragNDropGroup":"คุณสามารถตรวจสอบปัญหาที่กำหนดค่าไว้ในแท็บ {_termLibraryLecturePage} ของผู้เรียนทางด้านซ้ายได้","content.option.errorMessage.required":"โปรดเลือกคำตอบ","content.answerHint.title":"ระบุข้อความในช่องข้อมูลที่แสดงคำใบ้","content.answerHint.description":"คุณสามารถระบุข้อความใบ้สำหรับช่องป้อนที่จะใส่คำตอบได้","content.answerHint.placeholder":"ป้อนข้อความในช่องใส่ข้อมูล","content.explanationInfo.title":"เขียนอธิบาย","content.explanationInfo.description":"คำอธิบายนี้จะปรากฏหลังจากปัญหาได้รับการแก้ไขแล้ว","content.explanationInfo.checkbox.label":"ใช้","content.explanationInfo.textarea.placeholder":"กรุณาใส่คำอธิบาย","content.explanationInfo.textarea.errorMessage.required":"โปรดเขียนคำอธิบายเกี่ยวกับปัญหา","option.common.select.errorMessage.required":"กรุณากรอกตัวเลือก","option.common.select.placeholder":"ป้อนตัวเลือก","option.common.select.tooltip.minOptionInfoItem":"คุณต้องป้อนตัวเลือกอย่างน้อย 2 ตัวเลือก","option.common.select.tooltip.maxOptionInfoItem":"คุณไม่สามารถป้อนตัวเลือกได้มากกว่า 20 ตัวเลือก","option.common.select.addButton":"เพิ่มตัวเลือก","option.text.answerInfo.errorMessage.required":"กรุณากรอกคำตอบที่ถูกต้อง","option.text.answerInfo.hintText":"คำตอบจะถูกให้คะแนนโดยใช้ regular expressions หากคำตอบที่ถูกต้องรวมถึง meta-characters (^[]$()|*+?{}.\\) โปรดเติมเครื่องหมาย backslash (\\) ไว้ข้างหน้า","option.text.isAutoGrade.checkbox.label":"การให้คะแนนโดยการตรวจสอบโดยไม่ระบุคำตอบ","group.option.title":"กลุ่ม","group.option.addButton":"เพิ่มกลุ่ม","group.option.errorMessage.required":"กรุณาใส่ชื่อกลุ่ม","group.option.errorMessage.notChild":"มีกลุ่มที่ถูกสร้างขึ้นแล้ว ซึ่งไม่ได้อยู่ในตัวเลือกใดๆ ","group.option.tooltip.minDisabled":"คุณต้องกำหนดค่าอย่างน้อย 2 กลุ่ม","group.option.tooltip.maxDisabled":"คุณสามารถกำหนดค่ากลุ่มได้สูงสุด 6 กลุ่ม","answer.option.errorMessage":"ต้องมีตัวเลือกหรือค่าไฟล์","answer.option.title.text":"ตัวเลือก","answer.option.title.file":"ไฟล์","answer.option.title.group":"กลุ่มที่ตัวเลือกเป็นส่วนหนึ่งของ","answer.option.addButton":"เพิ่มตัวเลือก","answer.option.file.label":"อัพโหลดไฟล์","answer.option.file.description.imageSize":"อัตราส่วนที่แนะนำสำหรับไฟล์คือ 1:1 (185 x 185px)","answer.option.file.description.fileSize":"คุณสามารถอัพโหลดไฟล์ได้สูงสุด 3MB","answer.option.file.description.extension":"รองรับสกุลไฟล์ .mp3, .mp4, .mov, .png, .jpg, .svg และ .gif","answer.option.file.errorMessage.maxSize":"คุณสามารถอัพโหลดได้สูงสุด {size}MB.","answer.option.default.group":"ไม่มี","answer.option.tooltip.minDisabled":"คุณต้องกำหนดค่าอย่างน้อย 2 ตัวเลือก","answer.option.tooltip.maxDisabled":"คุณสามารถกำหนดค่าตั้งค่าได้สูงสุด 20 ตัวเลือก"};
|
|
2
2
|
|
|
3
3
|
export { messageTh as default };
|
|
@@ -20,9 +20,7 @@ const StyledInputGroup = styled(SortableListGroup).withConfig({
|
|
|
20
20
|
componentId: "sc-1nbx9b8-1"
|
|
21
21
|
})(["width:100%;.em-option-editor{margin-bottom:0.5rem;&:last-of-type{margin-bottom:0;}}"]);
|
|
22
22
|
const OptionSelectMultiple = () => {
|
|
23
|
-
const
|
|
24
|
-
intl
|
|
25
|
-
} = useRawEliceIntl();
|
|
23
|
+
const intl = useRawEliceIntl();
|
|
26
24
|
const {
|
|
27
25
|
disabled
|
|
28
26
|
} = useMaterialQuizEditContext();
|
|
@@ -20,9 +20,7 @@ const StyledInputGroup = styled(SortableListGroup).withConfig({
|
|
|
20
20
|
componentId: "sc-1xufc1p-1"
|
|
21
21
|
})(["width:100%;.em-option-editor{margin-bottom:0.5rem;&:last-of-type{margin-bottom:0;}}"]);
|
|
22
22
|
const OptionSelectMultipleOrder = () => {
|
|
23
|
-
const
|
|
24
|
-
intl
|
|
25
|
-
} = useRawEliceIntl();
|
|
23
|
+
const intl = useRawEliceIntl();
|
|
26
24
|
const {
|
|
27
25
|
disabled
|
|
28
26
|
} = useMaterialQuizEditContext();
|
|
@@ -23,9 +23,7 @@ const StyledInputPrefixRadioOption = styled(RadioOption).withConfig({
|
|
|
23
23
|
componentId: "sc-vizer2-2"
|
|
24
24
|
})([".eb-radio-option__label{display:none;}"]);
|
|
25
25
|
const OptionSelectOne = () => {
|
|
26
|
-
const
|
|
27
|
-
intl
|
|
28
|
-
} = useRawEliceIntl();
|
|
26
|
+
const intl = useRawEliceIntl();
|
|
29
27
|
const {
|
|
30
28
|
disabled
|
|
31
29
|
} = useMaterialQuizEditContext();
|
|
@@ -58,9 +58,7 @@ const QuestionBox = _a => {
|
|
|
58
58
|
isNextActive
|
|
59
59
|
} = _a,
|
|
60
60
|
props = __rest(_a, ["children", "footerActions", "title", "titlePrefix", "submitResult", "submitStatus", "onNext", "isNextActive"]);
|
|
61
|
-
const
|
|
62
|
-
intl
|
|
63
|
-
} = useRawEliceIntl();
|
|
61
|
+
const intl = useRawEliceIntl();
|
|
64
62
|
const {
|
|
65
63
|
vertical
|
|
66
64
|
} = useMaterialQuizState();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-quiz",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.240514.0",
|
|
4
4
|
"description": "User view and editing components of Elice material quiz",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@elice/api-client": "1.240131.0",
|
|
61
|
-
"@elice/blocks": "^1.
|
|
61
|
+
"@elice/blocks": "^1.240514.0",
|
|
62
62
|
"@elice/design-tokens": "^1.220803.0",
|
|
63
63
|
"@elice/icons": "^1.230814.0",
|
|
64
64
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
65
|
-
"@elice/intl": "0.240425.0-
|
|
65
|
+
"@elice/intl": "0.240425.0-rc.0",
|
|
66
66
|
"@elice/markdown": "^1.240124.0",
|
|
67
|
-
"@elice/material-shared-types": "1.
|
|
68
|
-
"@elice/material-shared-utils": "1.
|
|
67
|
+
"@elice/material-shared-types": "1.240514.0",
|
|
68
|
+
"@elice/material-shared-utils": "1.240514.0",
|
|
69
69
|
"@elice/mui-system": "^5.240108.1",
|
|
70
70
|
"@elice/types": "1.240131.0",
|
|
71
71
|
"@emotion/react": "^11.10.0",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"react-use": "^17.2.4",
|
|
88
88
|
"styled-components": "^5.3.0"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "04c7bc30a433e053218d63dedf81d76aa0fe251f"
|
|
91
91
|
}
|