touchstudy-core 0.1.151 → 0.1.153
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/components/Chats/configs/types.d.ts +3 -2
- package/dist/containers/Classes/components/StudentList.d.ts +3 -0
- package/dist/containers/Classes/views/ClassDetail.d.ts +1 -0
- package/dist/containers/ExamResult/components/MyAnswer/Textbook.d.ts +0 -2
- package/dist/containers/ExamResult/components/MyAnswer/configs/interfaces.d.ts +1 -1
- package/dist/containers/ExamResult/configs/types.d.ts +4 -1
- package/dist/containers/PreparedExam/components/Textbook.d.ts +4 -1
- package/dist/containers/PreparedExam/components/dialogs/ChapterProblemSolvingResultsDialog.d.ts +4 -1
- package/dist/containers/PreparedExam/components/dialogs/TextbookDrawer.d.ts +2 -1
- package/dist/containers/PreparedExam/views/PreparedItem.d.ts +4 -1
- package/dist/containers/StudentInfoDrawer/components/Exam/DrawerExamResultTab.d.ts +3 -0
- package/dist/containers/StudentInfoDrawer/components/Exam/ExamResultDrawer.d.ts +3 -0
- package/dist/containers/StudentInfoDrawer/components/Textbook/DrawerTextbookResultTab.d.ts +3 -0
- package/dist/containers/StudentInfoDrawer/configs/interfaces.d.ts +3 -0
- package/dist/containers/Users/views/UserList.d.ts +1 -0
- package/dist/index.js +129 -79
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +129 -79
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/functions/common.d.ts +1 -1
- package/dist/utils/types/format.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -6532,26 +6532,23 @@ var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
|
6532
6532
|
});
|
6533
6533
|
return questionsByCategory;
|
6534
6534
|
};
|
6535
|
-
var formatTextbookDataMyAnswer = function formatTextbookDataMyAnswer(inputData,
|
6536
|
-
var
|
6537
|
-
|
6538
|
-
|
6539
|
-
|
6540
|
-
|
6541
|
-
|
6542
|
-
|
6543
|
-
|
6544
|
-
|
6535
|
+
var formatTextbookDataMyAnswer = function formatTextbookDataMyAnswer(inputData, questionGroupIds) {
|
6536
|
+
var questionsByCategories = questionGroupIds.map(function (questionGroupId) {
|
6537
|
+
var _questions$, _questions$$categorie, _questions$2, _questions$2$categori;
|
6538
|
+
var questions = inputData.studentQuestionResults.filter(function (question) {
|
6539
|
+
return question.questionGroupId === questionGroupId;
|
6540
|
+
});
|
6541
|
+
var category = questions === null || questions === void 0 ? void 0 : (_questions$ = questions[0]) === null || _questions$ === void 0 ? void 0 : (_questions$$categorie = _questions$.categories) === null || _questions$$categorie === void 0 ? void 0 : _questions$$categorie[0];
|
6542
|
+
var subcategory = !category ? null : questions === null || questions === void 0 ? void 0 : (_questions$2 = questions[0]) === null || _questions$2 === void 0 ? void 0 : (_questions$2$categori = _questions$2.categories) === null || _questions$2$categori === void 0 ? void 0 : _questions$2$categori.find(function (c) {
|
6543
|
+
return !!c.parentCategoryId && c.parentCategoryId === (category === null || category === void 0 ? void 0 : category.id);
|
6544
|
+
});
|
6545
6545
|
return {
|
6546
|
-
category: category,
|
6547
|
-
questions:
|
6548
|
-
|
6549
|
-
return i.name === category.name;
|
6550
|
-
});
|
6551
|
-
})
|
6546
|
+
categories: category && subcategory ? [category, subcategory] : category ? [category] : [],
|
6547
|
+
questions: questions,
|
6548
|
+
questionGroupId: questionGroupId
|
6552
6549
|
};
|
6553
6550
|
});
|
6554
|
-
return
|
6551
|
+
return questionsByCategories;
|
6555
6552
|
};
|
6556
6553
|
var totalSolveTimeCategories = function totalSolveTimeCategories(inputData, categories) {
|
6557
6554
|
var uniqueCategories = new Set();
|
@@ -18516,7 +18513,7 @@ var TextbookAnswerItem = function TextbookAnswerItem(_ref) {
|
|
18516
18513
|
nextData = _ref.nextData,
|
18517
18514
|
isFirst = _ref.isFirst,
|
18518
18515
|
isLast = _ref.isLast,
|
18519
|
-
|
18516
|
+
questionGroupId = _ref.questionGroupId,
|
18520
18517
|
_ref$menuContextActio = _ref.menuContextActions,
|
18521
18518
|
menuContextActions = _ref$menuContextActio === void 0 ? [] : _ref$menuContextActio,
|
18522
18519
|
openContextMenu = _ref.openContextMenu,
|
@@ -18528,14 +18525,14 @@ var TextbookAnswerItem = function TextbookAnswerItem(_ref) {
|
|
18528
18525
|
var isLearningSpace = getLearningSpace();
|
18529
18526
|
var handleCloseContextMenu = function handleCloseContextMenu() {
|
18530
18527
|
onCloseContextMenu === null || onCloseContextMenu === void 0 ? void 0 : onCloseContextMenu(_extends({}, data, {
|
18531
|
-
id: ((data === null || data === void 0 ? void 0 : data.id) || 0) +
|
18528
|
+
id: ((data === null || data === void 0 ? void 0 : data.id) || 0) + questionGroupId
|
18532
18529
|
}));
|
18533
18530
|
};
|
18534
18531
|
var handleMoreClick = function handleMoreClick(e) {
|
18535
18532
|
e.preventDefault();
|
18536
18533
|
e.stopPropagation();
|
18537
18534
|
onOpenContextMenu === null || onOpenContextMenu === void 0 ? void 0 : onOpenContextMenu(_extends({}, data, {
|
18538
|
-
id: ((data === null || data === void 0 ? void 0 : data.id) || 0) +
|
18535
|
+
id: ((data === null || data === void 0 ? void 0 : data.id) || 0) + questionGroupId
|
18539
18536
|
}));
|
18540
18537
|
};
|
18541
18538
|
return React__default.createElement("div", {
|
@@ -18662,24 +18659,28 @@ var TextbookAnswerItem = function TextbookAnswerItem(_ref) {
|
|
18662
18659
|
|
18663
18660
|
var TextbookMyAnswer = function TextbookMyAnswer(_ref) {
|
18664
18661
|
var data = _ref.data,
|
18665
|
-
categories = _ref.categories,
|
18666
18662
|
itemProps = _ref.itemProps,
|
18667
18663
|
questionIdContextMenu = _ref.questionIdContextMenu,
|
18668
18664
|
isStudent = _ref.isStudent;
|
18669
|
-
var
|
18665
|
+
var questionGroupIds = Array.from(new Set(data.studentQuestionResults.map(function (i) {
|
18666
|
+
return i.questionGroupId;
|
18667
|
+
}))).sort(function (a, b) {
|
18668
|
+
return a - b;
|
18669
|
+
});
|
18670
|
+
var formattedData = formatTextbookDataMyAnswer(data, questionGroupIds);
|
18670
18671
|
var _useTranslation = useTranslation(),
|
18671
18672
|
t = _useTranslation.t;
|
18672
|
-
var renderAnswer = function renderAnswer(item, index, questions,
|
18673
|
+
var renderAnswer = function renderAnswer(item, index, questions, questionGroupId) {
|
18673
18674
|
var nextItem = index < questions.length - 1 ? questions[index + 1] : undefined;
|
18674
18675
|
var isLast = index === questions.length - 1;
|
18675
18676
|
var isFirst = index === 0;
|
18676
|
-
var isSelected = (item === null || item === void 0 ? void 0 : item.id) +
|
18677
|
+
var isSelected = (item === null || item === void 0 ? void 0 : item.id) + questionGroupId === questionIdContextMenu;
|
18677
18678
|
return React__default.createElement(TextbookAnswerItem, Object.assign({
|
18678
18679
|
key: index
|
18679
18680
|
}, itemProps, {
|
18680
18681
|
openContextMenu: isSelected,
|
18681
18682
|
data: item,
|
18682
|
-
|
18683
|
+
questionGroupId: questionGroupId,
|
18683
18684
|
nextData: nextItem,
|
18684
18685
|
isLast: isLast,
|
18685
18686
|
isFirst: isFirst,
|
@@ -18689,8 +18690,9 @@ var TextbookMyAnswer = function TextbookMyAnswer(_ref) {
|
|
18689
18690
|
return React__default.createElement("div", {
|
18690
18691
|
className: "" + styles$4["myanswer"]
|
18691
18692
|
}, formattedData && formattedData.length > 0 && formattedData.map(function (item) {
|
18693
|
+
var _item$categories;
|
18692
18694
|
return React__default.createElement("div", {
|
18693
|
-
key: item.
|
18695
|
+
key: item.questionGroupId
|
18694
18696
|
}, React__default.createElement("div", {
|
18695
18697
|
className: "" + printStyles["avoid-break-inside"]
|
18696
18698
|
}, React__default.createElement(Stack, {
|
@@ -18788,12 +18790,14 @@ var TextbookMyAnswer = function TextbookMyAnswer(_ref) {
|
|
18788
18790
|
fontSize: "12px",
|
18789
18791
|
fontWeight: 700
|
18790
18792
|
}
|
18791
|
-
}, item.
|
18793
|
+
}, (_item$categories = item.categories) === null || _item$categories === void 0 ? void 0 : _item$categories.map(function (i) {
|
18794
|
+
return i.name;
|
18795
|
+
}).join(" / ")))), React__default.createElement("div", {
|
18792
18796
|
className: styles$4["contentMyAnswer"]
|
18793
18797
|
}, React__default.createElement(ListView, {
|
18794
18798
|
data: item.questions,
|
18795
18799
|
render: function render(question, index) {
|
18796
|
-
return renderAnswer(question, index, item.questions, item.
|
18800
|
+
return renderAnswer(question, index, item.questions, item.questionGroupId);
|
18797
18801
|
}
|
18798
18802
|
})));
|
18799
18803
|
}));
|
@@ -19433,7 +19437,6 @@ var PrintExamResult = function PrintExamResult(_ref) {
|
|
19433
19437
|
sx: textStyle
|
19434
19438
|
}, t$1(TabList$2[0].label)), chapterId ? textbookResult && React__default.createElement(TextbookMyAnswer, {
|
19435
19439
|
data: textbookResult,
|
19436
|
-
categories: categoryResponses,
|
19437
19440
|
isStudent: isStudent
|
19438
19441
|
}) : resultData && React__default.createElement(MyAnswer, {
|
19439
19442
|
data: resultData,
|
@@ -20388,7 +20391,7 @@ var useExamResult = function useExamResult(props) {
|
|
20388
20391
|
studentId = _props$studentId === void 0 ? 0 : _props$studentId,
|
20389
20392
|
code = props.code,
|
20390
20393
|
chapterId = props.chapterId,
|
20391
|
-
|
20394
|
+
onViewQA = props.onViewQA;
|
20392
20395
|
var _useTranslation = useTranslation(),
|
20393
20396
|
t = _useTranslation.t;
|
20394
20397
|
var _useTab = useTab(),
|
@@ -20438,7 +20441,7 @@ var useExamResult = function useExamResult(props) {
|
|
20438
20441
|
var handleViewQAndA = function handleViewQAndA(e, note) {
|
20439
20442
|
e.stopPropagation();
|
20440
20443
|
if (!note.examSessionId || !note.questionId) return;
|
20441
|
-
|
20444
|
+
onViewQA === null || onViewQA === void 0 ? void 0 : onViewQA(note.userId, note.examSessionId, note.questionId);
|
20442
20445
|
};
|
20443
20446
|
var fileExamName = !resultData ? "" : "Exam-Result_" + resultData.student.fullName + "_" + resultData.title + "_(" + utcToLocalTime(resultData.startTime, "MM-DD-YYYY HH:mm") + ")";
|
20444
20447
|
var fileTextbookName = !textbookResult ? "" : "Textbook-Result_" + textbookResult.chapterName + "_(" + utcToLocalTime(textbookResult.startTime, "MM-DD-YYYY HH:mm") + ")";
|
@@ -20465,9 +20468,12 @@ var useExamResult = function useExamResult(props) {
|
|
20465
20468
|
};
|
20466
20469
|
|
20467
20470
|
var ExamResultV2 = function ExamResultV2(props) {
|
20468
|
-
var
|
20469
|
-
|
20470
|
-
|
20471
|
+
var role = props.role,
|
20472
|
+
isMyStoryStudent = props.isMyStoryStudent,
|
20473
|
+
onViewQA = props.onViewQA,
|
20474
|
+
chapterId = props.chapterId,
|
20475
|
+
studentId = props.studentId;
|
20476
|
+
var isAdminSite = role === Role.Admin;
|
20471
20477
|
var _useExamResult = useExamResult(props),
|
20472
20478
|
t = _useExamResult.t,
|
20473
20479
|
fileName = _useExamResult.fileName,
|
@@ -20585,7 +20591,13 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20585
20591
|
onItemClick: handleOpenNoteDrawer,
|
20586
20592
|
isLoading: isLoadingNotes
|
20587
20593
|
};
|
20588
|
-
var questionActions = [{
|
20594
|
+
var questionActions = chapterId ? [{
|
20595
|
+
label: "ask_a_question",
|
20596
|
+
textStyle: {
|
20597
|
+
color: "#3dc674"
|
20598
|
+
},
|
20599
|
+
onClick: handleOpenQuestionDialog
|
20600
|
+
}] : [{
|
20589
20601
|
label: "write_a_note_of_incorrect_answers",
|
20590
20602
|
textStyle: {
|
20591
20603
|
color: "#3dc674"
|
@@ -20604,6 +20616,14 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20604
20616
|
onOpenContextMenu: handleOpenQuestionContextMenu,
|
20605
20617
|
isStudent: isStudent
|
20606
20618
|
};
|
20619
|
+
var handleViewTextbookQA = function handleViewTextbookQA() {
|
20620
|
+
if (!studentId) return;
|
20621
|
+
onViewQA === null || onViewQA === void 0 ? void 0 : onViewQA(+studentId, textbookResult === null || textbookResult === void 0 ? void 0 : textbookResult.studentTextbookSessionId, undefined, true);
|
20622
|
+
};
|
20623
|
+
var handleViewExamQA = function handleViewExamQA() {
|
20624
|
+
if (!resultData) return;
|
20625
|
+
onViewQA === null || onViewQA === void 0 ? void 0 : onViewQA(resultData.student.id, resultData.examSessionId);
|
20626
|
+
};
|
20607
20627
|
return React__default.createElement(Fragment$1, null, React__default.createElement(LoadingComponent, {
|
20608
20628
|
isLoading: !!isLoading
|
20609
20629
|
}), timelyOrderQuestions[dataChartIndex] && longTimeSpend && effectSize ? React__default.createElement("div", {
|
@@ -20750,7 +20770,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20750
20770
|
direction: "row",
|
20751
20771
|
gap: "8px",
|
20752
20772
|
alignItems: "center"
|
20753
|
-
}, React__default.createElement(Button, {
|
20773
|
+
}, !isAdminSite && React__default.createElement(Button, {
|
20754
20774
|
variant: "outlined",
|
20755
20775
|
sx: {
|
20756
20776
|
color: styles.less_dark,
|
@@ -20766,7 +20786,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20766
20786
|
size: "14px"
|
20767
20787
|
})),
|
20768
20788
|
onClick: function onClick(e) {
|
20769
|
-
return isStudent ? handleOpenQuestionDialog(e) :
|
20789
|
+
return isStudent ? handleOpenQuestionDialog(e) : handleViewExamQA();
|
20770
20790
|
}
|
20771
20791
|
}, t(isStudent ? "ask_a_question2" : "check_q&a")), React__default.createElement(Button, {
|
20772
20792
|
variant: "outlined",
|
@@ -20824,7 +20844,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20824
20844
|
direction: "row",
|
20825
20845
|
gap: "8px",
|
20826
20846
|
alignItems: "center"
|
20827
|
-
}, React__default.createElement(Button, {
|
20847
|
+
}, !isAdminSite && React__default.createElement(Button, {
|
20828
20848
|
variant: "outlined",
|
20829
20849
|
sx: {
|
20830
20850
|
color: styles.less_dark,
|
@@ -20840,7 +20860,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20840
20860
|
size: "14px"
|
20841
20861
|
})),
|
20842
20862
|
onClick: function onClick(e) {
|
20843
|
-
return handleOpenQuestionDialog(e);
|
20863
|
+
return isStudent ? handleOpenQuestionDialog(e) : handleViewTextbookQA();
|
20844
20864
|
}
|
20845
20865
|
}, t(isStudent ? "ask_a_question2" : "check_q&a")), React__default.createElement(Button, {
|
20846
20866
|
variant: "outlined",
|
@@ -20905,7 +20925,6 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20905
20925
|
index: 0
|
20906
20926
|
}, chapterId ? textbookResult && React__default.createElement(TextbookMyAnswer, {
|
20907
20927
|
data: textbookResult,
|
20908
|
-
categories: categoryResponses,
|
20909
20928
|
isStudent: isStudent,
|
20910
20929
|
questionIdContextMenu: questionIdContextMenu,
|
20911
20930
|
itemProps: questionItemProp
|
@@ -21228,12 +21247,14 @@ var PrintExamResultView = function PrintExamResultView(_ref) {
|
|
21228
21247
|
|
21229
21248
|
var ExamResultDrawer = function ExamResultDrawer(_ref) {
|
21230
21249
|
var _BRIEF_GRADE_OPTIONS$;
|
21231
|
-
var
|
21250
|
+
var role = _ref.role,
|
21251
|
+
history = _ref.history,
|
21232
21252
|
open = _ref.open,
|
21233
21253
|
anchor = _ref.anchor,
|
21234
21254
|
width = _ref.width,
|
21235
21255
|
student = _ref.student,
|
21236
21256
|
data = _ref.data,
|
21257
|
+
onViewQA = _ref.onViewQA,
|
21237
21258
|
onClose = _ref.onClose;
|
21238
21259
|
var _useTranslation = useTranslation(),
|
21239
21260
|
t = _useTranslation.t;
|
@@ -21242,16 +21263,6 @@ var ExamResultDrawer = function ExamResultDrawer(_ref) {
|
|
21242
21263
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.language;
|
21243
21264
|
});
|
21244
21265
|
var search = window.location.search;
|
21245
|
-
var searchParams = new URLSearchParams(search);
|
21246
|
-
var handleViewExamQuestion = function handleViewExamQuestion(studentId, examSessionId, questionId) {
|
21247
|
-
searchParams.set("sId", "" + studentId);
|
21248
|
-
examSessionId && searchParams.set("eId", "" + examSessionId);
|
21249
|
-
questionId && searchParams.set("qId", "" + questionId);
|
21250
|
-
pushTo(history, {
|
21251
|
-
pathname: "/teacher/question-and-answers",
|
21252
|
-
search: searchParams.toString()
|
21253
|
-
});
|
21254
|
-
};
|
21255
21266
|
var studentId = student === null || student === void 0 ? void 0 : student.id;
|
21256
21267
|
var code = data === null || data === void 0 ? void 0 : data.code;
|
21257
21268
|
var examSessionId = data === null || data === void 0 ? void 0 : data.id;
|
@@ -21351,21 +21362,24 @@ var ExamResultDrawer = function ExamResultDrawer(_ref) {
|
|
21351
21362
|
pb: 4
|
21352
21363
|
}
|
21353
21364
|
}, examSessionId && React__default.createElement(ExamResultV2, {
|
21365
|
+
role: role,
|
21354
21366
|
history: history,
|
21355
21367
|
searchParams: search,
|
21356
21368
|
code: code,
|
21357
21369
|
examSessionId: examSessionId,
|
21358
21370
|
studentId: studentId,
|
21359
|
-
|
21371
|
+
onViewQA: onViewQA
|
21360
21372
|
})));
|
21361
21373
|
};
|
21362
21374
|
|
21363
21375
|
var DrawerExamResultTab = function DrawerExamResultTab(_ref) {
|
21364
|
-
var
|
21376
|
+
var role = _ref.role,
|
21377
|
+
history = _ref.history,
|
21365
21378
|
student = _ref.student,
|
21366
21379
|
selectedTab = _ref.selectedTab,
|
21367
21380
|
value = _ref.value,
|
21368
|
-
studentId = _ref.studentId
|
21381
|
+
studentId = _ref.studentId,
|
21382
|
+
onViewQA = _ref.onViewQA;
|
21369
21383
|
var _useVirtualList = useVirtualList(studentId, EXAM_SESSION_DEFAULT_FILTER, getExamSessionListApi),
|
21370
21384
|
items = _useVirtualList.items,
|
21371
21385
|
selectedItem = _useVirtualList.selectedItem,
|
@@ -21400,13 +21414,15 @@ var DrawerExamResultTab = function DrawerExamResultTab(_ref) {
|
|
21400
21414
|
onItemClick: handleChangeSelectedItem,
|
21401
21415
|
listHeight: 0
|
21402
21416
|
})), React__default.createElement(ExamResultDrawer, {
|
21417
|
+
role: role,
|
21403
21418
|
open: !!selectedItem,
|
21404
21419
|
data: selectedItem,
|
21405
21420
|
student: student,
|
21406
21421
|
anchor: "right",
|
21407
21422
|
width: "80dvw",
|
21408
21423
|
onClose: handleCloseDrawer,
|
21409
|
-
history: history
|
21424
|
+
history: history,
|
21425
|
+
onViewQA: onViewQA
|
21410
21426
|
}));
|
21411
21427
|
};
|
21412
21428
|
|
@@ -22415,11 +22431,13 @@ var ChapterDetail = function ChapterDetail(_ref) {
|
|
22415
22431
|
|
22416
22432
|
var ChapterProblemSolvingResultsDialog = function ChapterProblemSolvingResultsDialog(_ref) {
|
22417
22433
|
var t = _ref.t,
|
22434
|
+
role = _ref.role,
|
22418
22435
|
onClose = _ref.onClose,
|
22419
22436
|
open = _ref.open,
|
22420
22437
|
history = _ref.history,
|
22421
22438
|
chapterId = _ref.chapterId,
|
22422
|
-
studentId = _ref.studentId
|
22439
|
+
studentId = _ref.studentId,
|
22440
|
+
onViewQA = _ref.onViewQA;
|
22423
22441
|
return React__default.createElement(Dialog, {
|
22424
22442
|
onClose: onClose,
|
22425
22443
|
open: open,
|
@@ -22451,11 +22469,13 @@ var ChapterProblemSolvingResultsDialog = function ChapterProblemSolvingResultsDi
|
|
22451
22469
|
}, React__default.createElement(Stack, {
|
22452
22470
|
mx: "24px"
|
22453
22471
|
}, React__default.createElement(ExamResultV2, {
|
22472
|
+
role: role,
|
22454
22473
|
history: history,
|
22455
22474
|
searchParams: "",
|
22456
22475
|
chapterId: chapterId,
|
22457
22476
|
studentId: studentId,
|
22458
|
-
isMyStoryStudent: false
|
22477
|
+
isMyStoryStudent: false,
|
22478
|
+
onViewQA: onViewQA
|
22459
22479
|
})), React__default.createElement(DialogActions, {
|
22460
22480
|
sx: {
|
22461
22481
|
display: "flex",
|
@@ -22731,7 +22751,8 @@ var TextbookDrawer = function TextbookDrawer(_ref) {
|
|
22731
22751
|
studentId = _ref.studentId,
|
22732
22752
|
anchor = _ref.anchor,
|
22733
22753
|
navigate = _ref.navigate,
|
22734
|
-
onClose = _ref.onClose
|
22754
|
+
onClose = _ref.onClose,
|
22755
|
+
onViewQA = _ref.onViewQA;
|
22735
22756
|
var isStudent = role === Role.Student;
|
22736
22757
|
var _useTextbookDrawer = useTextbookDrawer({
|
22737
22758
|
isStudent: isStudent,
|
@@ -23005,12 +23026,14 @@ var TextbookDrawer = function TextbookDrawer(_ref) {
|
|
23005
23026
|
});
|
23006
23027
|
}))))), React__default.createElement(ChapterProblemSolvingResultsDialog, {
|
23007
23028
|
t: t,
|
23029
|
+
role: role,
|
23008
23030
|
theme: theme,
|
23009
23031
|
history: history,
|
23010
23032
|
chapterId: chapterSelected === null || chapterSelected === void 0 ? void 0 : chapterSelected.id,
|
23011
23033
|
studentId: studentId,
|
23012
23034
|
open: isOpenChapterDialog,
|
23013
|
-
onClose: handleCloseChapterDialog
|
23035
|
+
onClose: handleCloseChapterDialog,
|
23036
|
+
onViewQA: onViewQA
|
23014
23037
|
}), React__default.createElement(StartPageDialog, {
|
23015
23038
|
options: startPageOptions,
|
23016
23039
|
t: t,
|
@@ -23359,6 +23382,7 @@ var TextbookInfoDrawer = function TextbookInfoDrawer(_ref) {
|
|
23359
23382
|
var Textbook = function Textbook(_ref) {
|
23360
23383
|
var _textbook$createdBy, _textbook$createdBy2;
|
23361
23384
|
var t = _ref.t,
|
23385
|
+
role = _ref.role,
|
23362
23386
|
user = _ref.user,
|
23363
23387
|
theme = _ref.theme,
|
23364
23388
|
textbook = _ref.textbook,
|
@@ -23367,7 +23391,8 @@ var Textbook = function Textbook(_ref) {
|
|
23367
23391
|
navigate = _ref.navigate,
|
23368
23392
|
preparedType = _ref.preparedType,
|
23369
23393
|
preparedFilterType = _ref.preparedFilterType,
|
23370
|
-
getTextbookList = _ref.getTextbookList
|
23394
|
+
getTextbookList = _ref.getTextbookList,
|
23395
|
+
onViewQA = _ref.onViewQA;
|
23371
23396
|
var isTabletUp = useMediaQuery(theme.breakpoints.up("lg"));
|
23372
23397
|
var _useDrawer = useDrawer(),
|
23373
23398
|
isOpenDialog = _useDrawer.isOpenDialog,
|
@@ -23507,15 +23532,16 @@ var Textbook = function Textbook(_ref) {
|
|
23507
23532
|
}, React__default.createElement(IoTrash, {
|
23508
23533
|
size: "20px"
|
23509
23534
|
}), t("delete_test"))), isOpenDialog && React__default.createElement(TextbookDrawer, {
|
23510
|
-
role:
|
23535
|
+
role: role,
|
23511
23536
|
isOpen: isOpenDialog,
|
23512
23537
|
onClose: handleCloseDialog,
|
23513
23538
|
textbookId: textbook.id,
|
23514
23539
|
navigate: navigate,
|
23515
23540
|
width: !isTabletUp ? "100dvw" : "50dvw",
|
23516
|
-
anchor: "right"
|
23541
|
+
anchor: "right",
|
23542
|
+
onViewQA: onViewQA
|
23517
23543
|
}), openDetailDialog && React__default.createElement(TextbookInfoDrawer, {
|
23518
|
-
role:
|
23544
|
+
role: role,
|
23519
23545
|
user: user,
|
23520
23546
|
isSuperAdmin: isSuperAdmin,
|
23521
23547
|
isOpen: openDetailDialog,
|
@@ -23534,9 +23560,11 @@ var Textbook = function Textbook(_ref) {
|
|
23534
23560
|
};
|
23535
23561
|
|
23536
23562
|
var PreparedItem = function PreparedItem(_ref) {
|
23537
|
-
var
|
23563
|
+
var role = _ref.role,
|
23564
|
+
preparedType = _ref.preparedType,
|
23538
23565
|
preparedFilterType = _ref.preparedFilterType,
|
23539
|
-
navigate = _ref.navigate
|
23566
|
+
navigate = _ref.navigate,
|
23567
|
+
onViewQA = _ref.onViewQA;
|
23540
23568
|
var _useExpand = useExpand(),
|
23541
23569
|
expanded = _useExpand.expanded,
|
23542
23570
|
handleCloseExpand = _useExpand.handleCloseExpand,
|
@@ -24064,6 +24092,7 @@ var PreparedItem = function PreparedItem(_ref) {
|
|
24064
24092
|
}, textbookList === null || textbookList === void 0 ? void 0 : textbookList.map(function (textbook) {
|
24065
24093
|
return React__default.createElement(Textbook, {
|
24066
24094
|
t: t,
|
24095
|
+
role: role,
|
24067
24096
|
user: user,
|
24068
24097
|
theme: theme,
|
24069
24098
|
textbook: textbook,
|
@@ -24072,7 +24101,8 @@ var PreparedItem = function PreparedItem(_ref) {
|
|
24072
24101
|
navigate: navigate,
|
24073
24102
|
getTextbookList: getTextbookList,
|
24074
24103
|
preparedType: preparedType,
|
24075
|
-
preparedFilterType: preparedFilterType
|
24104
|
+
preparedFilterType: preparedFilterType,
|
24105
|
+
onViewQA: onViewQA
|
24076
24106
|
});
|
24077
24107
|
}), React__default.createElement(Stack, {
|
24078
24108
|
display: "flex",
|
@@ -24087,10 +24117,12 @@ var PreparedItem = function PreparedItem(_ref) {
|
|
24087
24117
|
};
|
24088
24118
|
|
24089
24119
|
var DrawerTextbookResultTab = function DrawerTextbookResultTab(_ref) {
|
24090
|
-
var
|
24120
|
+
var role = _ref.role,
|
24121
|
+
history = _ref.history,
|
24091
24122
|
studentId = _ref.studentId,
|
24092
24123
|
selectedTab = _ref.selectedTab,
|
24093
|
-
value = _ref.value
|
24124
|
+
value = _ref.value,
|
24125
|
+
onViewQA = _ref.onViewQA;
|
24094
24126
|
var _useVirtualList = useVirtualList(studentId, TEXTBOOK_DEFAULT_FILTER, getTextbookListApi),
|
24095
24127
|
items = _useVirtualList.items,
|
24096
24128
|
selectedItem = _useVirtualList.selectedItem,
|
@@ -24125,14 +24157,15 @@ var DrawerTextbookResultTab = function DrawerTextbookResultTab(_ref) {
|
|
24125
24157
|
onItemClick: handleChangeSelectedItem,
|
24126
24158
|
listHeight: 0
|
24127
24159
|
})), React__default.createElement(TextbookDrawer, {
|
24128
|
-
role:
|
24160
|
+
role: role,
|
24129
24161
|
navigate: history,
|
24130
24162
|
isOpen: !!selectedItem,
|
24131
24163
|
width: "80dvw",
|
24132
24164
|
onClose: handleCloseDrawer,
|
24133
24165
|
textbookId: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.id,
|
24134
24166
|
studentId: studentId,
|
24135
|
-
anchor: "right"
|
24167
|
+
anchor: "right",
|
24168
|
+
onViewQA: onViewQA
|
24136
24169
|
}));
|
24137
24170
|
};
|
24138
24171
|
|
@@ -24764,7 +24797,9 @@ var StudentInfoDrawer = function StudentInfoDrawer(props) {
|
|
24764
24797
|
studentId = props.studentId,
|
24765
24798
|
anchor = props.anchor,
|
24766
24799
|
width = props.width,
|
24767
|
-
history = props.history
|
24800
|
+
history = props.history,
|
24801
|
+
role = props.role,
|
24802
|
+
onViewQA = props.onViewQA;
|
24768
24803
|
var _useStudentInfoDrawer = useStudentInfoDrawer(props),
|
24769
24804
|
loadedTabs = _useStudentInfoDrawer.loadedTabs,
|
24770
24805
|
isLoading = _useStudentInfoDrawer.isLoading,
|
@@ -24808,21 +24843,26 @@ var StudentInfoDrawer = function StudentInfoDrawer(props) {
|
|
24808
24843
|
data: studentInfo,
|
24809
24844
|
isLoading: isLoading
|
24810
24845
|
}), loadedTabs[DrawerTab.Exam] && React__default.createElement(DrawerExamResultTab, {
|
24846
|
+
role: role,
|
24811
24847
|
value: DrawerTab.Exam,
|
24812
24848
|
selectedTab: selectedTab,
|
24813
24849
|
studentId: studentId,
|
24814
24850
|
student: studentInfo,
|
24815
|
-
history: history
|
24851
|
+
history: history,
|
24852
|
+
onViewQA: onViewQA
|
24816
24853
|
}), loadedTabs[DrawerTab.Textbook] && React__default.createElement(DrawerTextbookResultTab, {
|
24854
|
+
role: role,
|
24817
24855
|
value: DrawerTab.Textbook,
|
24818
24856
|
selectedTab: selectedTab,
|
24819
24857
|
studentId: studentId,
|
24820
|
-
history: history
|
24858
|
+
history: history,
|
24859
|
+
onViewQA: onViewQA
|
24821
24860
|
}))));
|
24822
24861
|
};
|
24823
24862
|
|
24824
24863
|
var StudentList = function StudentList(_ref) {
|
24825
|
-
var
|
24864
|
+
var role = _ref.role,
|
24865
|
+
history = _ref.history,
|
24826
24866
|
onAdd = _ref.onAdd,
|
24827
24867
|
paging = _ref.paging,
|
24828
24868
|
classList = _ref.classList,
|
@@ -24836,7 +24876,8 @@ var StudentList = function StudentList(_ref) {
|
|
24836
24876
|
handleSort = _ref.handleSort,
|
24837
24877
|
handleChangeSearchText = _ref.handleChangeSearchText,
|
24838
24878
|
handleChangePage = _ref.handleChangePage,
|
24839
|
-
handleRemoveStudentFromClass = _ref.handleRemoveStudentFromClass
|
24879
|
+
handleRemoveStudentFromClass = _ref.handleRemoveStudentFromClass,
|
24880
|
+
onViewQA = _ref.onViewQA;
|
24840
24881
|
var _useState = useState(),
|
24841
24882
|
selectedViewStudent = _useState[0],
|
24842
24883
|
setSelectedViewStudent = _useState[1];
|
@@ -24966,13 +25007,15 @@ var StudentList = function StudentList(_ref) {
|
|
24966
25007
|
onConfirm: handleRemoveStudentFromClass,
|
24967
25008
|
isDelete: true
|
24968
25009
|
}), React__default.createElement(StudentInfoDrawer, {
|
25010
|
+
role: role,
|
24969
25011
|
open: !!selectedViewStudent,
|
24970
25012
|
studentId: (selectedViewStudent === null || selectedViewStudent === void 0 ? void 0 : selectedViewStudent.studentId) || 0,
|
24971
25013
|
onClose: handleCloseStudentInfo,
|
24972
25014
|
anchor: "right",
|
24973
25015
|
width: "80dvw",
|
24974
25016
|
history: history,
|
24975
|
-
inert: true
|
25017
|
+
inert: true,
|
25018
|
+
onViewQA: onViewQA
|
24976
25019
|
}));
|
24977
25020
|
};
|
24978
25021
|
|
@@ -26550,7 +26593,8 @@ var ClassDetail = function ClassDetail(_ref) {
|
|
26550
26593
|
var id = _ref.id,
|
26551
26594
|
history = _ref.history,
|
26552
26595
|
classListUrl = _ref.classListUrl,
|
26553
|
-
role = _ref.role
|
26596
|
+
role = _ref.role,
|
26597
|
+
onViewQA = _ref.onViewQA;
|
26554
26598
|
var classId = !id || Number.isNaN(+id) ? 0 : +id;
|
26555
26599
|
var _useClassDetail = useClassDetail({
|
26556
26600
|
history: history,
|
@@ -26665,10 +26709,13 @@ var ClassDetail = function ClassDetail(_ref) {
|
|
26665
26709
|
value: selected,
|
26666
26710
|
index: TabList$1[1].value
|
26667
26711
|
}, !!classId && selected === TabList$1[1].value && React__default.createElement(StudentList, Object.assign({
|
26712
|
+
role: role,
|
26668
26713
|
disabled: isDisabled && !isTeacher,
|
26669
26714
|
onAdd: handleOpenSelectDialog,
|
26670
26715
|
history: history
|
26671
|
-
}, studentListProps
|
26716
|
+
}, studentListProps, {
|
26717
|
+
onViewQA: onViewQA
|
26718
|
+
}))), React__default.createElement(CustomTabPanel, {
|
26672
26719
|
value: selected,
|
26673
26720
|
index: TabList$1[2].value
|
26674
26721
|
}, !!classId && selected === TabList$1[2].value && React__default.createElement(TeacherList, Object.assign({
|
@@ -28401,7 +28448,8 @@ var UserRow = function UserRow(_ref) {
|
|
28401
28448
|
|
28402
28449
|
var UserList = function UserList(_ref) {
|
28403
28450
|
var role = _ref.role,
|
28404
|
-
history = _ref.history
|
28451
|
+
history = _ref.history,
|
28452
|
+
onViewQA = _ref.onViewQA;
|
28405
28453
|
var isSuperAdmin = useSelector(function (state) {
|
28406
28454
|
var _state$common, _state$common$user;
|
28407
28455
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : (_state$common$user = _state$common.user) === null || _state$common$user === void 0 ? void 0 : _state$common$user.isSuperAdmin;
|
@@ -28607,12 +28655,14 @@ var UserList = function UserList(_ref) {
|
|
28607
28655
|
onClose: handleCloseRecentUserActionDialog,
|
28608
28656
|
recentUserActions: recentUserActions
|
28609
28657
|
}), React__default.createElement(StudentInfoDrawer, {
|
28658
|
+
role: role,
|
28610
28659
|
open: !!selectedStudent,
|
28611
28660
|
studentId: selectedStudent === null || selectedStudent === void 0 ? void 0 : selectedStudent.id,
|
28612
28661
|
width: "80dvw",
|
28613
28662
|
anchor: "right",
|
28614
28663
|
onClose: handleCloseStudentInfo,
|
28615
28664
|
history: history,
|
28665
|
+
onViewQA: onViewQA,
|
28616
28666
|
inert: true
|
28617
28667
|
}), (isAdmin || isSuperAdmin) && React__default.createElement(DeleteUserCsvDialog, {
|
28618
28668
|
open: isOpenDeleteUserCsv,
|