touchstudy-core 0.1.152 → 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/configs/types.d.ts +3 -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 +97 -50
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +97 -50
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
@@ -8,7 +8,7 @@ export declare type ConversationResponse = {
|
|
8
8
|
};
|
9
9
|
export declare type ConversationsResponse = {
|
10
10
|
id: number;
|
11
|
-
studentExamSessionId
|
11
|
+
studentExamSessionId?: number;
|
12
12
|
courseId: number | null;
|
13
13
|
courseTitle: string | null;
|
14
14
|
score?: number | null;
|
@@ -22,7 +22,8 @@ export declare type ConversationsResponse = {
|
|
22
22
|
lastMessage: string | null;
|
23
23
|
examTitle: string;
|
24
24
|
examId: number;
|
25
|
-
examSessionId
|
25
|
+
examSessionId?: number;
|
26
|
+
studentTextbookSessionId?: number;
|
26
27
|
duration: string;
|
27
28
|
startTime: string;
|
28
29
|
examCreatedAt: string;
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { StudentClassQuery, StudentClassResponse, UserClassSortBy } from "../configs/types";
|
2
2
|
import { ChangeEvent, FC, RefObject } from "react";
|
3
3
|
import { PagingResponse } from "../../../utils/types/pagingResponse";
|
4
|
+
import { Role } from "../../../utils";
|
4
5
|
interface Props {
|
6
|
+
role: Role;
|
5
7
|
history: any;
|
6
8
|
onAdd?: Function;
|
7
9
|
paging: PagingResponse;
|
@@ -17,6 +19,7 @@ interface Props {
|
|
17
19
|
handleChangeSearchText: (e: ChangeEvent<HTMLInputElement>) => void;
|
18
20
|
handleChangePage: (_: any, page: number) => void;
|
19
21
|
handleRemoveStudentFromClass: () => Promise<void>;
|
22
|
+
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
20
23
|
}
|
21
24
|
declare const StudentList: FC<Props>;
|
22
25
|
export default StudentList;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { QuestionAnswerType } from './../../../utils/enums/examStatus';
|
2
2
|
import { CategoryResponse } from "../../../utils/types/examResults";
|
3
|
+
import { Role } from '../../../utils';
|
3
4
|
export interface CategoryFormat extends CategoryResponse {
|
4
5
|
totalSolveTime: number;
|
5
6
|
}
|
@@ -99,5 +100,6 @@ export declare type ExamResultV2Props = {
|
|
99
100
|
code?: string;
|
100
101
|
isMyStoryStudent?: boolean;
|
101
102
|
chapterId?: number;
|
102
|
-
|
103
|
+
role: Role;
|
104
|
+
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
103
105
|
};
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Theme } from "@mui/material";
|
3
3
|
import { PreparedFilterType, PreparedType, Textbook } from "../configs/types";
|
4
|
+
import { Role } from "../../../utils";
|
4
5
|
declare type Props = {
|
5
6
|
t: any;
|
7
|
+
role: Role;
|
6
8
|
user: any;
|
7
9
|
theme: Theme;
|
8
10
|
textbook: Textbook;
|
@@ -12,6 +14,7 @@ declare type Props = {
|
|
12
14
|
preparedType?: PreparedType;
|
13
15
|
preparedFilterType?: PreparedFilterType;
|
14
16
|
getTextbookList: () => void;
|
17
|
+
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
15
18
|
};
|
16
|
-
declare const Textbook: ({ t, user, theme, textbook, isStudent, isSuperAdmin, navigate, preparedType, preparedFilterType, getTextbookList }: Props) => React.JSX.Element;
|
19
|
+
declare const Textbook: ({ t, role, user, theme, textbook, isStudent, isSuperAdmin, navigate, preparedType, preparedFilterType, getTextbookList, onViewQA }: Props) => React.JSX.Element;
|
17
20
|
export default Textbook;
|
package/dist/containers/PreparedExam/components/dialogs/ChapterProblemSolvingResultsDialog.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Theme } from "@mui/material";
|
3
|
+
import { Role } from "../../../../utils";
|
3
4
|
declare type Props = {
|
5
|
+
role: Role;
|
4
6
|
open: boolean;
|
5
7
|
onClose: () => void;
|
6
8
|
theme: Theme;
|
@@ -8,6 +10,7 @@ declare type Props = {
|
|
8
10
|
history: any;
|
9
11
|
chapterId?: number;
|
10
12
|
studentId?: number;
|
13
|
+
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
11
14
|
};
|
12
|
-
declare const ChapterProblemSolvingResultsDialog: ({ t, onClose, open, history, chapterId, studentId }: Props) => React.JSX.Element;
|
15
|
+
declare const ChapterProblemSolvingResultsDialog: ({ t, role, onClose, open, history, chapterId, studentId, onViewQA }: Props) => React.JSX.Element;
|
13
16
|
export default ChapterProblemSolvingResultsDialog;
|
@@ -9,6 +9,7 @@ declare type Props = {
|
|
9
9
|
navigate?: any;
|
10
10
|
width?: number | string;
|
11
11
|
anchor?: "left" | "top" | "right" | "bottom";
|
12
|
+
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
12
13
|
};
|
13
|
-
declare const TextbookDrawer: ({ isOpen, role, width, textbookId, studentId, anchor, navigate, onClose }: Props) => React.JSX.Element;
|
14
|
+
declare const TextbookDrawer: ({ isOpen, role, width, textbookId, studentId, anchor, navigate, onClose, onViewQA }: Props) => React.JSX.Element;
|
14
15
|
export default TextbookDrawer;
|
@@ -1,8 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { Role } from '../../../utils';
|
2
3
|
declare type Props = {
|
4
|
+
role: Role;
|
3
5
|
preparedType?: any;
|
4
6
|
preparedFilterType?: any;
|
5
7
|
navigate?: any;
|
8
|
+
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
6
9
|
};
|
7
|
-
declare const PreparedItem: ({ preparedType, preparedFilterType, navigate }: Props) => React.JSX.Element;
|
10
|
+
declare const PreparedItem: ({ role, preparedType, preparedFilterType, navigate, onViewQA }: Props) => React.JSX.Element;
|
8
11
|
export default PreparedItem;
|
@@ -1,9 +1,12 @@
|
|
1
1
|
import { FC } from "react";
|
2
2
|
import { TabContentProps } from "../../configs/interfaces";
|
3
3
|
import { StudentInfo } from "../../configs/types";
|
4
|
+
import { Role } from "../../../../utils";
|
4
5
|
interface Props extends TabContentProps {
|
6
|
+
role: Role;
|
5
7
|
history: any;
|
6
8
|
student?: StudentInfo;
|
9
|
+
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
7
10
|
}
|
8
11
|
declare const DrawerExamResultTab: FC<Props>;
|
9
12
|
export default DrawerExamResultTab;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { FC } from "react";
|
2
2
|
import { ExamSessionResponse, StudentInfo } from "../../configs/types";
|
3
|
+
import { Role } from "../../../../utils";
|
3
4
|
interface Props {
|
5
|
+
role: Role;
|
4
6
|
open?: boolean;
|
5
7
|
student?: StudentInfo;
|
6
8
|
anchor?: "left" | "top" | "right" | "bottom";
|
@@ -8,6 +10,7 @@ interface Props {
|
|
8
10
|
width?: number | string;
|
9
11
|
data?: ExamSessionResponse;
|
10
12
|
history: any;
|
13
|
+
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
11
14
|
}
|
12
15
|
declare const ExamResultDrawer: FC<Props>;
|
13
16
|
export default ExamResultDrawer;
|
@@ -1,7 +1,10 @@
|
|
1
1
|
import { FC } from "react";
|
2
2
|
import { TabContentProps } from "../../configs/interfaces";
|
3
|
+
import { Role } from "../../../../utils";
|
3
4
|
interface Props extends TabContentProps {
|
5
|
+
role: Role;
|
4
6
|
history: any;
|
7
|
+
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
5
8
|
}
|
6
9
|
declare const DrawerTextbookResultTab: FC<Props>;
|
7
10
|
export default DrawerTextbookResultTab;
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { BoxProps } from "@mui/material";
|
2
2
|
import { DrawerTab } from "./enums";
|
3
3
|
import { CourseAttendanceResponse, ExamSessionResponse, LessonResponse, TextbookResponse } from "./types";
|
4
|
+
import { Role } from "../../../utils";
|
4
5
|
export interface StudentInfoDrawerProps {
|
6
|
+
role: Role;
|
5
7
|
studentId?: number;
|
6
8
|
open: boolean;
|
7
9
|
inert?: boolean;
|
@@ -9,6 +11,7 @@ export interface StudentInfoDrawerProps {
|
|
9
11
|
onClose?: () => void;
|
10
12
|
width?: number | string;
|
11
13
|
history: any;
|
14
|
+
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
12
15
|
}
|
13
16
|
export interface TabContentProps {
|
14
17
|
studentId: number;
|
@@ -3,6 +3,7 @@ import { Role } from "../../../utils/constants";
|
|
3
3
|
interface Props {
|
4
4
|
role: Role;
|
5
5
|
history: any;
|
6
|
+
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
6
7
|
}
|
7
8
|
declare const UserList: FC<Props>;
|
8
9
|
export default UserList;
|
package/dist/index.js
CHANGED
@@ -19419,7 +19419,6 @@ var PrintExamResult = function PrintExamResult(_ref) {
|
|
19419
19419
|
sx: textStyle
|
19420
19420
|
}, i18n.t(TabList$2[0].label)), chapterId ? textbookResult && React__default.createElement(TextbookMyAnswer, {
|
19421
19421
|
data: textbookResult,
|
19422
|
-
categories: categoryResponses,
|
19423
19422
|
isStudent: isStudent
|
19424
19423
|
}) : resultData && React__default.createElement(MyAnswer, {
|
19425
19424
|
data: resultData,
|
@@ -20374,7 +20373,7 @@ var useExamResult = function useExamResult(props) {
|
|
20374
20373
|
studentId = _props$studentId === void 0 ? 0 : _props$studentId,
|
20375
20374
|
code = props.code,
|
20376
20375
|
chapterId = props.chapterId,
|
20377
|
-
|
20376
|
+
onViewQA = props.onViewQA;
|
20378
20377
|
var _useTranslation = reactI18next.useTranslation(),
|
20379
20378
|
t = _useTranslation.t;
|
20380
20379
|
var _useTab = useTab(),
|
@@ -20424,7 +20423,7 @@ var useExamResult = function useExamResult(props) {
|
|
20424
20423
|
var handleViewQAndA = function handleViewQAndA(e, note) {
|
20425
20424
|
e.stopPropagation();
|
20426
20425
|
if (!note.examSessionId || !note.questionId) return;
|
20427
|
-
|
20426
|
+
onViewQA === null || onViewQA === void 0 ? void 0 : onViewQA(note.userId, note.examSessionId, note.questionId);
|
20428
20427
|
};
|
20429
20428
|
var fileExamName = !resultData ? "" : "Exam-Result_" + resultData.student.fullName + "_" + resultData.title + "_(" + utcToLocalTime(resultData.startTime, "MM-DD-YYYY HH:mm") + ")";
|
20430
20429
|
var fileTextbookName = !textbookResult ? "" : "Textbook-Result_" + textbookResult.chapterName + "_(" + utcToLocalTime(textbookResult.startTime, "MM-DD-YYYY HH:mm") + ")";
|
@@ -20451,9 +20450,12 @@ var useExamResult = function useExamResult(props) {
|
|
20451
20450
|
};
|
20452
20451
|
|
20453
20452
|
var ExamResultV2 = function ExamResultV2(props) {
|
20454
|
-
var
|
20455
|
-
|
20456
|
-
|
20453
|
+
var role = props.role,
|
20454
|
+
isMyStoryStudent = props.isMyStoryStudent,
|
20455
|
+
onViewQA = props.onViewQA,
|
20456
|
+
chapterId = props.chapterId,
|
20457
|
+
studentId = props.studentId;
|
20458
|
+
var isAdminSite = role === exports.Role.Admin;
|
20457
20459
|
var _useExamResult = useExamResult(props),
|
20458
20460
|
t = _useExamResult.t,
|
20459
20461
|
fileName = _useExamResult.fileName,
|
@@ -20571,7 +20573,13 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20571
20573
|
onItemClick: handleOpenNoteDrawer,
|
20572
20574
|
isLoading: isLoadingNotes
|
20573
20575
|
};
|
20574
|
-
var questionActions = [{
|
20576
|
+
var questionActions = chapterId ? [{
|
20577
|
+
label: "ask_a_question",
|
20578
|
+
textStyle: {
|
20579
|
+
color: "#3dc674"
|
20580
|
+
},
|
20581
|
+
onClick: handleOpenQuestionDialog
|
20582
|
+
}] : [{
|
20575
20583
|
label: "write_a_note_of_incorrect_answers",
|
20576
20584
|
textStyle: {
|
20577
20585
|
color: "#3dc674"
|
@@ -20590,6 +20598,14 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20590
20598
|
onOpenContextMenu: handleOpenQuestionContextMenu,
|
20591
20599
|
isStudent: isStudent
|
20592
20600
|
};
|
20601
|
+
var handleViewTextbookQA = function handleViewTextbookQA() {
|
20602
|
+
if (!studentId) return;
|
20603
|
+
onViewQA === null || onViewQA === void 0 ? void 0 : onViewQA(+studentId, textbookResult === null || textbookResult === void 0 ? void 0 : textbookResult.studentTextbookSessionId, undefined, true);
|
20604
|
+
};
|
20605
|
+
var handleViewExamQA = function handleViewExamQA() {
|
20606
|
+
if (!resultData) return;
|
20607
|
+
onViewQA === null || onViewQA === void 0 ? void 0 : onViewQA(resultData.student.id, resultData.examSessionId);
|
20608
|
+
};
|
20593
20609
|
return React__default.createElement(React.Fragment, null, React__default.createElement(LoadingComponent, {
|
20594
20610
|
isLoading: !!isLoading
|
20595
20611
|
}), timelyOrderQuestions[dataChartIndex] && longTimeSpend && effectSize ? React__default.createElement("div", {
|
@@ -20736,7 +20752,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20736
20752
|
direction: "row",
|
20737
20753
|
gap: "8px",
|
20738
20754
|
alignItems: "center"
|
20739
|
-
}, React__default.createElement(material.Button, {
|
20755
|
+
}, !isAdminSite && React__default.createElement(material.Button, {
|
20740
20756
|
variant: "outlined",
|
20741
20757
|
sx: {
|
20742
20758
|
color: styles.less_dark,
|
@@ -20752,7 +20768,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20752
20768
|
size: "14px"
|
20753
20769
|
})),
|
20754
20770
|
onClick: function onClick(e) {
|
20755
|
-
return isStudent ? handleOpenQuestionDialog(e) :
|
20771
|
+
return isStudent ? handleOpenQuestionDialog(e) : handleViewExamQA();
|
20756
20772
|
}
|
20757
20773
|
}, t(isStudent ? "ask_a_question2" : "check_q&a")), React__default.createElement(material.Button, {
|
20758
20774
|
variant: "outlined",
|
@@ -20810,7 +20826,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20810
20826
|
direction: "row",
|
20811
20827
|
gap: "8px",
|
20812
20828
|
alignItems: "center"
|
20813
|
-
}, React__default.createElement(material.Button, {
|
20829
|
+
}, !isAdminSite && React__default.createElement(material.Button, {
|
20814
20830
|
variant: "outlined",
|
20815
20831
|
sx: {
|
20816
20832
|
color: styles.less_dark,
|
@@ -20826,7 +20842,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20826
20842
|
size: "14px"
|
20827
20843
|
})),
|
20828
20844
|
onClick: function onClick(e) {
|
20829
|
-
return handleOpenQuestionDialog(e);
|
20845
|
+
return isStudent ? handleOpenQuestionDialog(e) : handleViewTextbookQA();
|
20830
20846
|
}
|
20831
20847
|
}, t(isStudent ? "ask_a_question2" : "check_q&a")), React__default.createElement(material.Button, {
|
20832
20848
|
variant: "outlined",
|
@@ -21213,12 +21229,14 @@ var PrintExamResultView = function PrintExamResultView(_ref) {
|
|
21213
21229
|
|
21214
21230
|
var ExamResultDrawer = function ExamResultDrawer(_ref) {
|
21215
21231
|
var _BRIEF_GRADE_OPTIONS$;
|
21216
|
-
var
|
21232
|
+
var role = _ref.role,
|
21233
|
+
history = _ref.history,
|
21217
21234
|
open = _ref.open,
|
21218
21235
|
anchor = _ref.anchor,
|
21219
21236
|
width = _ref.width,
|
21220
21237
|
student = _ref.student,
|
21221
21238
|
data = _ref.data,
|
21239
|
+
onViewQA = _ref.onViewQA,
|
21222
21240
|
onClose = _ref.onClose;
|
21223
21241
|
var _useTranslation = reactI18next.useTranslation(),
|
21224
21242
|
t = _useTranslation.t;
|
@@ -21227,16 +21245,6 @@ var ExamResultDrawer = function ExamResultDrawer(_ref) {
|
|
21227
21245
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.language;
|
21228
21246
|
});
|
21229
21247
|
var search = window.location.search;
|
21230
|
-
var searchParams = new URLSearchParams(search);
|
21231
|
-
var handleViewExamQuestion = function handleViewExamQuestion(studentId, examSessionId, questionId) {
|
21232
|
-
searchParams.set("sId", "" + studentId);
|
21233
|
-
examSessionId && searchParams.set("eId", "" + examSessionId);
|
21234
|
-
questionId && searchParams.set("qId", "" + questionId);
|
21235
|
-
pushTo(history, {
|
21236
|
-
pathname: "/teacher/question-and-answers",
|
21237
|
-
search: searchParams.toString()
|
21238
|
-
});
|
21239
|
-
};
|
21240
21248
|
var studentId = student === null || student === void 0 ? void 0 : student.id;
|
21241
21249
|
var code = data === null || data === void 0 ? void 0 : data.code;
|
21242
21250
|
var examSessionId = data === null || data === void 0 ? void 0 : data.id;
|
@@ -21336,21 +21344,24 @@ var ExamResultDrawer = function ExamResultDrawer(_ref) {
|
|
21336
21344
|
pb: 4
|
21337
21345
|
}
|
21338
21346
|
}, examSessionId && React__default.createElement(ExamResultV2, {
|
21347
|
+
role: role,
|
21339
21348
|
history: history,
|
21340
21349
|
searchParams: search,
|
21341
21350
|
code: code,
|
21342
21351
|
examSessionId: examSessionId,
|
21343
21352
|
studentId: studentId,
|
21344
|
-
|
21353
|
+
onViewQA: onViewQA
|
21345
21354
|
})));
|
21346
21355
|
};
|
21347
21356
|
|
21348
21357
|
var DrawerExamResultTab = function DrawerExamResultTab(_ref) {
|
21349
|
-
var
|
21358
|
+
var role = _ref.role,
|
21359
|
+
history = _ref.history,
|
21350
21360
|
student = _ref.student,
|
21351
21361
|
selectedTab = _ref.selectedTab,
|
21352
21362
|
value = _ref.value,
|
21353
|
-
studentId = _ref.studentId
|
21363
|
+
studentId = _ref.studentId,
|
21364
|
+
onViewQA = _ref.onViewQA;
|
21354
21365
|
var _useVirtualList = useVirtualList(studentId, EXAM_SESSION_DEFAULT_FILTER, getExamSessionListApi),
|
21355
21366
|
items = _useVirtualList.items,
|
21356
21367
|
selectedItem = _useVirtualList.selectedItem,
|
@@ -21385,13 +21396,15 @@ var DrawerExamResultTab = function DrawerExamResultTab(_ref) {
|
|
21385
21396
|
onItemClick: handleChangeSelectedItem,
|
21386
21397
|
listHeight: 0
|
21387
21398
|
})), React__default.createElement(ExamResultDrawer, {
|
21399
|
+
role: role,
|
21388
21400
|
open: !!selectedItem,
|
21389
21401
|
data: selectedItem,
|
21390
21402
|
student: student,
|
21391
21403
|
anchor: "right",
|
21392
21404
|
width: "80dvw",
|
21393
21405
|
onClose: handleCloseDrawer,
|
21394
|
-
history: history
|
21406
|
+
history: history,
|
21407
|
+
onViewQA: onViewQA
|
21395
21408
|
}));
|
21396
21409
|
};
|
21397
21410
|
|
@@ -22400,11 +22413,13 @@ var ChapterDetail = function ChapterDetail(_ref) {
|
|
22400
22413
|
|
22401
22414
|
var ChapterProblemSolvingResultsDialog = function ChapterProblemSolvingResultsDialog(_ref) {
|
22402
22415
|
var t = _ref.t,
|
22416
|
+
role = _ref.role,
|
22403
22417
|
onClose = _ref.onClose,
|
22404
22418
|
open = _ref.open,
|
22405
22419
|
history = _ref.history,
|
22406
22420
|
chapterId = _ref.chapterId,
|
22407
|
-
studentId = _ref.studentId
|
22421
|
+
studentId = _ref.studentId,
|
22422
|
+
onViewQA = _ref.onViewQA;
|
22408
22423
|
return React__default.createElement(material.Dialog, {
|
22409
22424
|
onClose: onClose,
|
22410
22425
|
open: open,
|
@@ -22436,11 +22451,13 @@ var ChapterProblemSolvingResultsDialog = function ChapterProblemSolvingResultsDi
|
|
22436
22451
|
}, React__default.createElement(material.Stack, {
|
22437
22452
|
mx: "24px"
|
22438
22453
|
}, React__default.createElement(ExamResultV2, {
|
22454
|
+
role: role,
|
22439
22455
|
history: history,
|
22440
22456
|
searchParams: "",
|
22441
22457
|
chapterId: chapterId,
|
22442
22458
|
studentId: studentId,
|
22443
|
-
isMyStoryStudent: false
|
22459
|
+
isMyStoryStudent: false,
|
22460
|
+
onViewQA: onViewQA
|
22444
22461
|
})), React__default.createElement(material.DialogActions, {
|
22445
22462
|
sx: {
|
22446
22463
|
display: "flex",
|
@@ -22716,7 +22733,8 @@ var TextbookDrawer = function TextbookDrawer(_ref) {
|
|
22716
22733
|
studentId = _ref.studentId,
|
22717
22734
|
anchor = _ref.anchor,
|
22718
22735
|
navigate = _ref.navigate,
|
22719
|
-
onClose = _ref.onClose
|
22736
|
+
onClose = _ref.onClose,
|
22737
|
+
onViewQA = _ref.onViewQA;
|
22720
22738
|
var isStudent = role === exports.Role.Student;
|
22721
22739
|
var _useTextbookDrawer = useTextbookDrawer({
|
22722
22740
|
isStudent: isStudent,
|
@@ -22990,12 +23008,14 @@ var TextbookDrawer = function TextbookDrawer(_ref) {
|
|
22990
23008
|
});
|
22991
23009
|
}))))), React__default.createElement(ChapterProblemSolvingResultsDialog, {
|
22992
23010
|
t: t,
|
23011
|
+
role: role,
|
22993
23012
|
theme: theme,
|
22994
23013
|
history: history,
|
22995
23014
|
chapterId: chapterSelected === null || chapterSelected === void 0 ? void 0 : chapterSelected.id,
|
22996
23015
|
studentId: studentId,
|
22997
23016
|
open: isOpenChapterDialog,
|
22998
|
-
onClose: handleCloseChapterDialog
|
23017
|
+
onClose: handleCloseChapterDialog,
|
23018
|
+
onViewQA: onViewQA
|
22999
23019
|
}), React__default.createElement(StartPageDialog, {
|
23000
23020
|
options: startPageOptions,
|
23001
23021
|
t: t,
|
@@ -23344,6 +23364,7 @@ var TextbookInfoDrawer = function TextbookInfoDrawer(_ref) {
|
|
23344
23364
|
var Textbook = function Textbook(_ref) {
|
23345
23365
|
var _textbook$createdBy, _textbook$createdBy2;
|
23346
23366
|
var t = _ref.t,
|
23367
|
+
role = _ref.role,
|
23347
23368
|
user = _ref.user,
|
23348
23369
|
theme = _ref.theme,
|
23349
23370
|
textbook = _ref.textbook,
|
@@ -23352,7 +23373,8 @@ var Textbook = function Textbook(_ref) {
|
|
23352
23373
|
navigate = _ref.navigate,
|
23353
23374
|
preparedType = _ref.preparedType,
|
23354
23375
|
preparedFilterType = _ref.preparedFilterType,
|
23355
|
-
getTextbookList = _ref.getTextbookList
|
23376
|
+
getTextbookList = _ref.getTextbookList,
|
23377
|
+
onViewQA = _ref.onViewQA;
|
23356
23378
|
var isTabletUp = material.useMediaQuery(theme.breakpoints.up("lg"));
|
23357
23379
|
var _useDrawer = useDrawer(),
|
23358
23380
|
isOpenDialog = _useDrawer.isOpenDialog,
|
@@ -23492,15 +23514,16 @@ var Textbook = function Textbook(_ref) {
|
|
23492
23514
|
}, React__default.createElement(io5.IoTrash, {
|
23493
23515
|
size: "20px"
|
23494
23516
|
}), t("delete_test"))), isOpenDialog && React__default.createElement(TextbookDrawer, {
|
23495
|
-
role:
|
23517
|
+
role: role,
|
23496
23518
|
isOpen: isOpenDialog,
|
23497
23519
|
onClose: handleCloseDialog,
|
23498
23520
|
textbookId: textbook.id,
|
23499
23521
|
navigate: navigate,
|
23500
23522
|
width: !isTabletUp ? "100dvw" : "50dvw",
|
23501
|
-
anchor: "right"
|
23523
|
+
anchor: "right",
|
23524
|
+
onViewQA: onViewQA
|
23502
23525
|
}), openDetailDialog && React__default.createElement(TextbookInfoDrawer, {
|
23503
|
-
role:
|
23526
|
+
role: role,
|
23504
23527
|
user: user,
|
23505
23528
|
isSuperAdmin: isSuperAdmin,
|
23506
23529
|
isOpen: openDetailDialog,
|
@@ -23519,9 +23542,11 @@ var Textbook = function Textbook(_ref) {
|
|
23519
23542
|
};
|
23520
23543
|
|
23521
23544
|
var PreparedItem = function PreparedItem(_ref) {
|
23522
|
-
var
|
23545
|
+
var role = _ref.role,
|
23546
|
+
preparedType = _ref.preparedType,
|
23523
23547
|
preparedFilterType = _ref.preparedFilterType,
|
23524
|
-
navigate = _ref.navigate
|
23548
|
+
navigate = _ref.navigate,
|
23549
|
+
onViewQA = _ref.onViewQA;
|
23525
23550
|
var _useExpand = useExpand(),
|
23526
23551
|
expanded = _useExpand.expanded,
|
23527
23552
|
handleCloseExpand = _useExpand.handleCloseExpand,
|
@@ -24049,6 +24074,7 @@ var PreparedItem = function PreparedItem(_ref) {
|
|
24049
24074
|
}, textbookList === null || textbookList === void 0 ? void 0 : textbookList.map(function (textbook) {
|
24050
24075
|
return React__default.createElement(Textbook, {
|
24051
24076
|
t: t,
|
24077
|
+
role: role,
|
24052
24078
|
user: user,
|
24053
24079
|
theme: theme,
|
24054
24080
|
textbook: textbook,
|
@@ -24057,7 +24083,8 @@ var PreparedItem = function PreparedItem(_ref) {
|
|
24057
24083
|
navigate: navigate,
|
24058
24084
|
getTextbookList: getTextbookList,
|
24059
24085
|
preparedType: preparedType,
|
24060
|
-
preparedFilterType: preparedFilterType
|
24086
|
+
preparedFilterType: preparedFilterType,
|
24087
|
+
onViewQA: onViewQA
|
24061
24088
|
});
|
24062
24089
|
}), React__default.createElement(material.Stack, {
|
24063
24090
|
display: "flex",
|
@@ -24072,10 +24099,12 @@ var PreparedItem = function PreparedItem(_ref) {
|
|
24072
24099
|
};
|
24073
24100
|
|
24074
24101
|
var DrawerTextbookResultTab = function DrawerTextbookResultTab(_ref) {
|
24075
|
-
var
|
24102
|
+
var role = _ref.role,
|
24103
|
+
history = _ref.history,
|
24076
24104
|
studentId = _ref.studentId,
|
24077
24105
|
selectedTab = _ref.selectedTab,
|
24078
|
-
value = _ref.value
|
24106
|
+
value = _ref.value,
|
24107
|
+
onViewQA = _ref.onViewQA;
|
24079
24108
|
var _useVirtualList = useVirtualList(studentId, TEXTBOOK_DEFAULT_FILTER, getTextbookListApi),
|
24080
24109
|
items = _useVirtualList.items,
|
24081
24110
|
selectedItem = _useVirtualList.selectedItem,
|
@@ -24110,14 +24139,15 @@ var DrawerTextbookResultTab = function DrawerTextbookResultTab(_ref) {
|
|
24110
24139
|
onItemClick: handleChangeSelectedItem,
|
24111
24140
|
listHeight: 0
|
24112
24141
|
})), React__default.createElement(TextbookDrawer, {
|
24113
|
-
role:
|
24142
|
+
role: role,
|
24114
24143
|
navigate: history,
|
24115
24144
|
isOpen: !!selectedItem,
|
24116
24145
|
width: "80dvw",
|
24117
24146
|
onClose: handleCloseDrawer,
|
24118
24147
|
textbookId: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.id,
|
24119
24148
|
studentId: studentId,
|
24120
|
-
anchor: "right"
|
24149
|
+
anchor: "right",
|
24150
|
+
onViewQA: onViewQA
|
24121
24151
|
}));
|
24122
24152
|
};
|
24123
24153
|
|
@@ -24749,7 +24779,9 @@ var StudentInfoDrawer = function StudentInfoDrawer(props) {
|
|
24749
24779
|
studentId = props.studentId,
|
24750
24780
|
anchor = props.anchor,
|
24751
24781
|
width = props.width,
|
24752
|
-
history = props.history
|
24782
|
+
history = props.history,
|
24783
|
+
role = props.role,
|
24784
|
+
onViewQA = props.onViewQA;
|
24753
24785
|
var _useStudentInfoDrawer = useStudentInfoDrawer(props),
|
24754
24786
|
loadedTabs = _useStudentInfoDrawer.loadedTabs,
|
24755
24787
|
isLoading = _useStudentInfoDrawer.isLoading,
|
@@ -24793,21 +24825,26 @@ var StudentInfoDrawer = function StudentInfoDrawer(props) {
|
|
24793
24825
|
data: studentInfo,
|
24794
24826
|
isLoading: isLoading
|
24795
24827
|
}), loadedTabs[DrawerTab.Exam] && React__default.createElement(DrawerExamResultTab, {
|
24828
|
+
role: role,
|
24796
24829
|
value: DrawerTab.Exam,
|
24797
24830
|
selectedTab: selectedTab,
|
24798
24831
|
studentId: studentId,
|
24799
24832
|
student: studentInfo,
|
24800
|
-
history: history
|
24833
|
+
history: history,
|
24834
|
+
onViewQA: onViewQA
|
24801
24835
|
}), loadedTabs[DrawerTab.Textbook] && React__default.createElement(DrawerTextbookResultTab, {
|
24836
|
+
role: role,
|
24802
24837
|
value: DrawerTab.Textbook,
|
24803
24838
|
selectedTab: selectedTab,
|
24804
24839
|
studentId: studentId,
|
24805
|
-
history: history
|
24840
|
+
history: history,
|
24841
|
+
onViewQA: onViewQA
|
24806
24842
|
}))));
|
24807
24843
|
};
|
24808
24844
|
|
24809
24845
|
var StudentList = function StudentList(_ref) {
|
24810
|
-
var
|
24846
|
+
var role = _ref.role,
|
24847
|
+
history = _ref.history,
|
24811
24848
|
onAdd = _ref.onAdd,
|
24812
24849
|
paging = _ref.paging,
|
24813
24850
|
classList = _ref.classList,
|
@@ -24821,7 +24858,8 @@ var StudentList = function StudentList(_ref) {
|
|
24821
24858
|
handleSort = _ref.handleSort,
|
24822
24859
|
handleChangeSearchText = _ref.handleChangeSearchText,
|
24823
24860
|
handleChangePage = _ref.handleChangePage,
|
24824
|
-
handleRemoveStudentFromClass = _ref.handleRemoveStudentFromClass
|
24861
|
+
handleRemoveStudentFromClass = _ref.handleRemoveStudentFromClass,
|
24862
|
+
onViewQA = _ref.onViewQA;
|
24825
24863
|
var _useState = React.useState(),
|
24826
24864
|
selectedViewStudent = _useState[0],
|
24827
24865
|
setSelectedViewStudent = _useState[1];
|
@@ -24951,13 +24989,15 @@ var StudentList = function StudentList(_ref) {
|
|
24951
24989
|
onConfirm: handleRemoveStudentFromClass,
|
24952
24990
|
isDelete: true
|
24953
24991
|
}), React__default.createElement(StudentInfoDrawer, {
|
24992
|
+
role: role,
|
24954
24993
|
open: !!selectedViewStudent,
|
24955
24994
|
studentId: (selectedViewStudent === null || selectedViewStudent === void 0 ? void 0 : selectedViewStudent.studentId) || 0,
|
24956
24995
|
onClose: handleCloseStudentInfo,
|
24957
24996
|
anchor: "right",
|
24958
24997
|
width: "80dvw",
|
24959
24998
|
history: history,
|
24960
|
-
inert: true
|
24999
|
+
inert: true,
|
25000
|
+
onViewQA: onViewQA
|
24961
25001
|
}));
|
24962
25002
|
};
|
24963
25003
|
|
@@ -26535,7 +26575,8 @@ var ClassDetail = function ClassDetail(_ref) {
|
|
26535
26575
|
var id = _ref.id,
|
26536
26576
|
history = _ref.history,
|
26537
26577
|
classListUrl = _ref.classListUrl,
|
26538
|
-
role = _ref.role
|
26578
|
+
role = _ref.role,
|
26579
|
+
onViewQA = _ref.onViewQA;
|
26539
26580
|
var classId = !id || Number.isNaN(+id) ? 0 : +id;
|
26540
26581
|
var _useClassDetail = useClassDetail({
|
26541
26582
|
history: history,
|
@@ -26650,10 +26691,13 @@ var ClassDetail = function ClassDetail(_ref) {
|
|
26650
26691
|
value: selected,
|
26651
26692
|
index: TabList$1[1].value
|
26652
26693
|
}, !!classId && selected === TabList$1[1].value && React__default.createElement(StudentList, Object.assign({
|
26694
|
+
role: role,
|
26653
26695
|
disabled: isDisabled && !isTeacher,
|
26654
26696
|
onAdd: handleOpenSelectDialog,
|
26655
26697
|
history: history
|
26656
|
-
}, studentListProps
|
26698
|
+
}, studentListProps, {
|
26699
|
+
onViewQA: onViewQA
|
26700
|
+
}))), React__default.createElement(CustomTabPanel, {
|
26657
26701
|
value: selected,
|
26658
26702
|
index: TabList$1[2].value
|
26659
26703
|
}, !!classId && selected === TabList$1[2].value && React__default.createElement(TeacherList, Object.assign({
|
@@ -28386,7 +28430,8 @@ var UserRow = function UserRow(_ref) {
|
|
28386
28430
|
|
28387
28431
|
var UserList = function UserList(_ref) {
|
28388
28432
|
var role = _ref.role,
|
28389
|
-
history = _ref.history
|
28433
|
+
history = _ref.history,
|
28434
|
+
onViewQA = _ref.onViewQA;
|
28390
28435
|
var isSuperAdmin = reactRedux.useSelector(function (state) {
|
28391
28436
|
var _state$common, _state$common$user;
|
28392
28437
|
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;
|
@@ -28592,12 +28637,14 @@ var UserList = function UserList(_ref) {
|
|
28592
28637
|
onClose: handleCloseRecentUserActionDialog,
|
28593
28638
|
recentUserActions: recentUserActions
|
28594
28639
|
}), React__default.createElement(StudentInfoDrawer, {
|
28640
|
+
role: role,
|
28595
28641
|
open: !!selectedStudent,
|
28596
28642
|
studentId: selectedStudent === null || selectedStudent === void 0 ? void 0 : selectedStudent.id,
|
28597
28643
|
width: "80dvw",
|
28598
28644
|
anchor: "right",
|
28599
28645
|
onClose: handleCloseStudentInfo,
|
28600
28646
|
history: history,
|
28647
|
+
onViewQA: onViewQA,
|
28601
28648
|
inert: true
|
28602
28649
|
}), (isAdmin || isSuperAdmin) && React__default.createElement(DeleteUserCsvDialog, {
|
28603
28650
|
open: isOpenDeleteUserCsv,
|