touchstudy-core 0.1.32 → 0.1.33
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/containers/ExamResult/hooks/useExamResult.d.ts +3 -5
- package/dist/index.css +5 -0
- package/dist/index.js +115 -92
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +116 -93
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/helpers.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -9,7 +9,7 @@ import { useDispatch, useSelector } from 'react-redux';
|
|
9
9
|
import axios from 'axios';
|
10
10
|
import { useTranslation, initReactI18next } from 'react-i18next';
|
11
11
|
export { I18nextProvider, useTranslation } from 'react-i18next';
|
12
|
-
import { Grid, Dialog, DialogTitle, IconButton, DialogContent, TextField, DialogActions, Button, Box, Typography, Pagination, styled, Tooltip, tooltipClasses, Stack, ClickAwayListener, CircularProgress, FormControl, RadioGroup, FormControlLabel, Radio, FormGroup, FormLabel, InputLabel, Container, Table, TableBody, TableRow, TableCell, TableHead, Paper, InputBase } from '@mui/material';
|
12
|
+
import { Grid, Dialog, DialogTitle, IconButton, DialogContent, TextField, DialogActions, Button, Box, Typography, Pagination, styled, Tooltip, tooltipClasses, Stack, ClickAwayListener, useMediaQuery, CircularProgress, FormControl, RadioGroup, FormControlLabel, Radio, FormGroup, FormLabel, InputLabel, Container, Table, TableBody, TableRow, TableCell, TableHead, Paper, InputBase } from '@mui/material';
|
13
13
|
import { gapi } from 'gapi-script';
|
14
14
|
import Pusher from 'pusher-js';
|
15
15
|
import { IoClose, IoCloseOutline, IoSearch } from 'react-icons/io5';
|
@@ -136,7 +136,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
136
136
|
return target;
|
137
137
|
}
|
138
138
|
|
139
|
-
var
|
139
|
+
var styleGlobal = {"btn-login-google":"_2HqmH","block-login":"_wWIyO","box-login":"_38Lo1","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-menu-flag":"_XK8oS","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","content-text":"_3S4f2","dropdown-content-language":"_3ajui","dropdown-item-language":"_3Y_y4","dropdown-item-language-active":"_CzNMi","dropdown-academy":"_3CMVp","image-academy":"_2ibYC","academy-btn":"_1JMRU","switch-icon":"_N4FNf","dropdown-content-academy":"_31Dr0","dropdown-academy-item":"_3bjcz","noGutters":"_31ZQk","custom-col-2":"_3yXyK","custom-col-3":"_1RsJQ","custom-col-5":"_L42CP","custom-col-10":"_2u6eL","custom-row":"_8x7OP","custom-col":"_1JmTh","custom-col-4":"_3HO1e","custom-col-8":"_Oy31M","custom-col-12":"_3aUKo","custom-container":"_39LRs","form-label":"__Ut-u","form-control":"_2k4dX","btn-outline-primary":"_2PWdX","sort-icons":"_mQvLF","active":"_3oAH-","form-select":"_3W3aw","truncate":"_3NJzN"};
|
140
140
|
|
141
141
|
var AuthenticationMessage;
|
142
142
|
(function (AuthenticationMessage) {
|
@@ -463,18 +463,18 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
463
463
|
var handleSubmit = formikProps.handleSubmit;
|
464
464
|
return React.createElement(Grid, {
|
465
465
|
container: true,
|
466
|
-
className: "" +
|
466
|
+
className: "" + styleGlobal["box-login"]
|
467
467
|
}, React.createElement(Grid, {
|
468
468
|
item: true,
|
469
469
|
className: "p-0 d-flex justify-content-center"
|
470
470
|
}, React.createElement("form", {
|
471
|
-
className: "" +
|
471
|
+
className: "" + styleGlobal["block-login"],
|
472
472
|
onSubmit: handleSubmit
|
473
473
|
}, React.createElement("div", {
|
474
|
-
className: "" +
|
474
|
+
className: "" + styleGlobal["block-form"]
|
475
475
|
}, React.createElement("img", {
|
476
476
|
src: "/images/logo.jpeg",
|
477
|
-
className: "" +
|
477
|
+
className: "" + styleGlobal["img-login-rectangle"]
|
478
478
|
}), React.createElement("div", {
|
479
479
|
className: "p-0 mt-1 mb-4"
|
480
480
|
}, React.createElement(GoogleLogin, {
|
@@ -483,7 +483,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
483
483
|
onSuccess: onSuccessGoogle,
|
484
484
|
onFailure: onFailureGoogle,
|
485
485
|
cookiePolicy: "single_host_origin",
|
486
|
-
className: "" +
|
486
|
+
className: "" + styleGlobal["btn-login-google"],
|
487
487
|
isSignedIn: true
|
488
488
|
}))))));
|
489
489
|
});
|
@@ -547,7 +547,7 @@ var Login = function Login(_ref) {
|
|
547
547
|
var _useLogin = useLogin$1(onNavigate),
|
548
548
|
defaultInfo = _useLogin.defaultInfo;
|
549
549
|
return React.createElement("div", {
|
550
|
-
className:
|
550
|
+
className: styleGlobal["login"] + " container-fluid font-family-lato"
|
551
551
|
}, React.createElement(Grid, {
|
552
552
|
container: true,
|
553
553
|
spacing: 3,
|
@@ -1577,6 +1577,8 @@ var my_problem_solving_order = "내 순서";
|
|
1577
1577
|
var top_rankings_problem_solving_order = "상위권 학생의 순서";
|
1578
1578
|
var comparison_of_top_rankings_and_problem_solving_order = "상위권과 문제 푸는 순서 비교";
|
1579
1579
|
var my_answers = "내 해답";
|
1580
|
+
var request_for_consultation = "상담요청";
|
1581
|
+
var ask_a_question_with_a_problem = "문제로 질문하기";
|
1580
1582
|
var lang_ko = {
|
1581
1583
|
problem_solving: problem_solving,
|
1582
1584
|
my_story: my_story,
|
@@ -1864,7 +1866,9 @@ var lang_ko = {
|
|
1864
1866
|
my_problem_solving_order: my_problem_solving_order,
|
1865
1867
|
top_rankings_problem_solving_order: top_rankings_problem_solving_order,
|
1866
1868
|
comparison_of_top_rankings_and_problem_solving_order: comparison_of_top_rankings_and_problem_solving_order,
|
1867
|
-
my_answers: my_answers
|
1869
|
+
my_answers: my_answers,
|
1870
|
+
request_for_consultation: request_for_consultation,
|
1871
|
+
ask_a_question_with_a_problem: ask_a_question_with_a_problem
|
1868
1872
|
};
|
1869
1873
|
|
1870
1874
|
var problem_solving$1 = "Problem Solving";
|
@@ -2190,6 +2194,8 @@ var my_problem_solving_order$1 = "My problem solving order";
|
|
2190
2194
|
var top_rankings_problem_solving_order$1 = "Top rankings problem solving order";
|
2191
2195
|
var comparison_of_top_rankings_and_problem_solving_order$1 = "Comparison of top rankings and problem-solving order";
|
2192
2196
|
var my_answers$1 = "My answers";
|
2197
|
+
var request_for_consultation$1 = "Request for consultation";
|
2198
|
+
var ask_a_question_with_a_problem$1 = "Ask a question with a problem";
|
2193
2199
|
var lang_en = {
|
2194
2200
|
problem_solving: problem_solving$1,
|
2195
2201
|
my_story: my_story$1,
|
@@ -2512,7 +2518,9 @@ var lang_en = {
|
|
2512
2518
|
my_problem_solving_order: my_problem_solving_order$1,
|
2513
2519
|
top_rankings_problem_solving_order: top_rankings_problem_solving_order$1,
|
2514
2520
|
comparison_of_top_rankings_and_problem_solving_order: comparison_of_top_rankings_and_problem_solving_order$1,
|
2515
|
-
my_answers: my_answers$1
|
2521
|
+
my_answers: my_answers$1,
|
2522
|
+
request_for_consultation: request_for_consultation$1,
|
2523
|
+
ask_a_question_with_a_problem: ask_a_question_with_a_problem$1
|
2516
2524
|
};
|
2517
2525
|
|
2518
2526
|
i18n.use(initReactI18next).init({
|
@@ -2827,10 +2835,10 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
2827
2835
|
};
|
2828
2836
|
return React.createElement(Fragment$1, null, React.createElement(Button, {
|
2829
2837
|
onClick: handleOpen,
|
2830
|
-
className: "" +
|
2838
|
+
className: "" + styleGlobal["academy-btn"],
|
2831
2839
|
sx: _extends({}, popoverStyle)
|
2832
2840
|
}, React.createElement("div", {
|
2833
|
-
className: "" +
|
2841
|
+
className: "" + styleGlobal["image-academy"]
|
2834
2842
|
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.image ? React.createElement("img", {
|
2835
2843
|
src: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.image,
|
2836
2844
|
alt: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.name
|
@@ -2843,7 +2851,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
2843
2851
|
minWidth: 150
|
2844
2852
|
}
|
2845
2853
|
}, (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.name) || t(role === Role.Admin ? "switch_academy_admin" : "switch_academy")), React.createElement("div", {
|
2846
|
-
className: "" +
|
2854
|
+
className: "" + styleGlobal["switch-icon"]
|
2847
2855
|
}, React.createElement(GoArrowSwitch, {
|
2848
2856
|
size: 14
|
2849
2857
|
}))), (isSuperAdmin || !isAdmin) && React.createElement(Popover, {
|
@@ -2885,7 +2893,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
2885
2893
|
fontWeight: 600
|
2886
2894
|
}
|
2887
2895
|
}, React.createElement("div", {
|
2888
|
-
className: "" +
|
2896
|
+
className: "" + styleGlobal["image-academy"]
|
2889
2897
|
}, option.image ? React.createElement(Box$1, {
|
2890
2898
|
component: "img",
|
2891
2899
|
alt: option.name,
|
@@ -3930,6 +3938,36 @@ var iconChecked = function iconChecked(_ref) {
|
|
3930
3938
|
}));
|
3931
3939
|
};
|
3932
3940
|
|
3941
|
+
var ellipsisText = function ellipsisText(text, maxLength) {
|
3942
|
+
return text.length > maxLength ? text.slice(0, maxLength) + " ..." : text;
|
3943
|
+
};
|
3944
|
+
var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
3945
|
+
var uniqueCategories = new Set();
|
3946
|
+
var filterCategories = categories.filter(function (category) {
|
3947
|
+
if (!uniqueCategories.has(category.name)) {
|
3948
|
+
uniqueCategories.add(category.name);
|
3949
|
+
return true;
|
3950
|
+
}
|
3951
|
+
return false;
|
3952
|
+
});
|
3953
|
+
var questionsByCategory = filterCategories.map(function (category) {
|
3954
|
+
return {
|
3955
|
+
category: category,
|
3956
|
+
questions: inputData.questions.filter(function (question) {
|
3957
|
+
return question.category.name === category.name;
|
3958
|
+
})
|
3959
|
+
};
|
3960
|
+
});
|
3961
|
+
return questionsByCategory;
|
3962
|
+
};
|
3963
|
+
var formatTimeSecond = function formatTimeSecond(duration, t) {
|
3964
|
+
duration = Math.round(duration);
|
3965
|
+
return "" + (duration < 60 ? "" + duration + t("seconds") : t("mins_mins_seconds_seconds", {
|
3966
|
+
mins: Math.floor(duration / 60),
|
3967
|
+
seconds: duration % 60
|
3968
|
+
}));
|
3969
|
+
};
|
3970
|
+
|
3933
3971
|
var ChatHeader = function ChatHeader(_ref) {
|
3934
3972
|
var fullName = _ref.fullName,
|
3935
3973
|
examTitle = _ref.examTitle,
|
@@ -3950,6 +3988,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
3950
3988
|
handleConfirm = _useDialog.handleConfirm;
|
3951
3989
|
var _useTranslation = useTranslation(),
|
3952
3990
|
t = _useTranslation.t;
|
3991
|
+
var isTabletUp = useMediaQuery('(min-width:900px)');
|
3953
3992
|
var isStudent = roles === null || roles === void 0 ? void 0 : roles.includes(Roles$1.Student);
|
3954
3993
|
var filterDurationExam = useMemo(function () {
|
3955
3994
|
if (!durationExam) return;
|
@@ -3978,7 +4017,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
3978
4017
|
alignItems: "center",
|
3979
4018
|
flexDirection: "row",
|
3980
4019
|
gap: "8px"
|
3981
|
-
}, React.createElement(iconPersonNoActive, null), React.createElement(Typography, {
|
4020
|
+
}, React.createElement(iconPersonNoActive, null), isTabletUp && React.createElement(Typography, {
|
3982
4021
|
fontWeight: 500,
|
3983
4022
|
fontSize: "14px",
|
3984
4023
|
lineHeight: "16.71px",
|
@@ -3988,7 +4027,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
3988
4027
|
fontSize: "14px",
|
3989
4028
|
lineHeight: "16.71px",
|
3990
4029
|
color: "#5458D5"
|
3991
|
-
}, teacherName)), !!examTitle && React.createElement(Box, {
|
4030
|
+
}, ellipsisText(teacherName || "", 15))), !!examTitle && React.createElement(Box, {
|
3992
4031
|
display: "flex",
|
3993
4032
|
alignItems: "start",
|
3994
4033
|
color: "#5458D5",
|
@@ -3998,7 +4037,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
3998
4037
|
fontWeight: 600,
|
3999
4038
|
fontSize: "12px",
|
4000
4039
|
lineHeight: "14.32px"
|
4001
|
-
}, examTitle), React.createElement(Box, {
|
4040
|
+
}, ellipsisText(examTitle, 15)), React.createElement(Box, {
|
4002
4041
|
display: "flex",
|
4003
4042
|
flexDirection: "row",
|
4004
4043
|
gap: "4px"
|
@@ -6577,9 +6616,9 @@ var SubjectSelector = function SubjectSelector(_ref) {
|
|
6577
6616
|
!minimumTextSearchLength && defaultValueAtFirst && options.length && onChange(options[0], subjects[0]);
|
6578
6617
|
}, [JSON.stringify(options), JSON.stringify(subjects), defaultValueAtFirst, minimumTextSearchLength]);
|
6579
6618
|
return React.createElement(FormGroup, {
|
6580
|
-
className: "" +
|
6619
|
+
className: "" + styleGlobal["filter-item"]
|
6581
6620
|
}, !!title && React.createElement("label", {
|
6582
|
-
className: "" +
|
6621
|
+
className: "" + styleGlobal["title-form"]
|
6583
6622
|
}, title), React.createElement(CustomSelectOption, {
|
6584
6623
|
options: options,
|
6585
6624
|
inputValue: searchString,
|
@@ -7048,12 +7087,12 @@ var SortIcon = function SortIcon(_ref) {
|
|
7048
7087
|
var isAscending = _ref.isAscending,
|
7049
7088
|
onClick = _ref.onClick;
|
7050
7089
|
return React.createElement("div", {
|
7051
|
-
className: "d-flex flex-column " +
|
7090
|
+
className: "d-flex flex-column " + styleGlobal["sort-icons"],
|
7052
7091
|
onClick: onClick
|
7053
7092
|
}, React.createElement(FaSortUp, {
|
7054
|
-
className: isAscending === true ?
|
7093
|
+
className: isAscending === true ? styleGlobal["active"] : ""
|
7055
7094
|
}), React.createElement(FaSortDown, {
|
7056
|
-
className: isAscending === false ?
|
7095
|
+
className: isAscending === false ? styleGlobal["active"] : ""
|
7057
7096
|
}));
|
7058
7097
|
};
|
7059
7098
|
|
@@ -7556,17 +7595,17 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
7556
7595
|
return React.createElement(Grid, {
|
7557
7596
|
container: true,
|
7558
7597
|
spacing: 3,
|
7559
|
-
className: className + " " +
|
7598
|
+
className: className + " " + styleGlobal["custom-row"]
|
7560
7599
|
}, React.createElement(Grid, {
|
7561
7600
|
item: true,
|
7562
7601
|
xs: 5,
|
7563
7602
|
className: 'mb-2'
|
7564
7603
|
}, React.createElement("label", {
|
7565
|
-
className:
|
7604
|
+
className: styleGlobal["form-label"] + " " + styles$1["question-label"],
|
7566
7605
|
htmlFor: "title"
|
7567
7606
|
}, t("title")), React.createElement("input", {
|
7568
7607
|
disabled: isDisabled,
|
7569
|
-
className: "" +
|
7608
|
+
className: "" + styleGlobal["form-control"],
|
7570
7609
|
value: exam.title,
|
7571
7610
|
id: "title",
|
7572
7611
|
placeholder: t("enter_title"),
|
@@ -7576,7 +7615,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
7576
7615
|
xs: 3,
|
7577
7616
|
className: 'mb-2'
|
7578
7617
|
}, React.createElement("label", {
|
7579
|
-
className:
|
7618
|
+
className: styleGlobal["form-label"] + " " + styles$1["question-label"],
|
7580
7619
|
htmlFor: "duration"
|
7581
7620
|
}, t("duration")), React.createElement(CustomSelect, {
|
7582
7621
|
inputId: "duration",
|
@@ -7589,7 +7628,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
7589
7628
|
xs: 3,
|
7590
7629
|
className: 'mb-2'
|
7591
7630
|
}, React.createElement("label", {
|
7592
|
-
className:
|
7631
|
+
className: styleGlobal["form-label"] + " " + styles$1["question-label"],
|
7593
7632
|
htmlFor: "duration"
|
7594
7633
|
}, t("subject"), " ", selectedSubject === null || selectedSubject === void 0 ? void 0 : selectedSubject.name), React.createElement(CustomSelect, {
|
7595
7634
|
inputId: "subject",
|
@@ -7620,7 +7659,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
7620
7659
|
xs: 12
|
7621
7660
|
}, React.createElement("button", {
|
7622
7661
|
disabled: isDisabled,
|
7623
|
-
className:
|
7662
|
+
className: styleGlobal["btn-outline-primary"] + " w-100 d-flex justify-content-center align-items-center " + styles$1["question-btn"] + " mt-3",
|
7624
7663
|
onClick: handleAddArticle
|
7625
7664
|
}, React.createElement(FaPlusCircle, {
|
7626
7665
|
className: "me-2"
|
@@ -8546,10 +8585,15 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
8546
8585
|
enabled: true,
|
8547
8586
|
hideEmptySeries: true,
|
8548
8587
|
y: {
|
8549
|
-
formatter: function formatter(
|
8588
|
+
formatter: function formatter(val, _ref) {
|
8550
8589
|
var dataPointIndex = _ref.dataPointIndex;
|
8551
8590
|
if (dataPointIndex > 0) {
|
8552
|
-
|
8591
|
+
var _timelyOrderQuestion$, _questions$length, _questions;
|
8592
|
+
var questions = ((_timelyOrderQuestion$ = timelyOrderQuestion[dataChartIndex]) === null || _timelyOrderQuestion$ === void 0 ? void 0 : _timelyOrderQuestion$.questions) || null;
|
8593
|
+
var questionLength = (_questions$length = questions === null || questions === void 0 ? void 0 : questions.length) != null ? _questions$length : 0;
|
8594
|
+
return val != null ? t("problem_number_question", {
|
8595
|
+
number: questions !== null ? ((_questions = questions[questionLength - val]) === null || _questions === void 0 ? void 0 : _questions.questionOrder) + 1 : val
|
8596
|
+
}) : t("no_data");
|
8553
8597
|
}
|
8554
8598
|
return null;
|
8555
8599
|
}
|
@@ -8557,7 +8601,7 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
8557
8601
|
},
|
8558
8602
|
legend: {
|
8559
8603
|
show: true,
|
8560
|
-
fontSize:
|
8604
|
+
fontSize: "12px",
|
8561
8605
|
fontWeight: 600,
|
8562
8606
|
markers: {
|
8563
8607
|
width: 16,
|
@@ -8581,11 +8625,11 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
8581
8625
|
}), ["."]),
|
8582
8626
|
axisBorder: {
|
8583
8627
|
show: true,
|
8584
|
-
color:
|
8628
|
+
color: "#E4E7EC"
|
8585
8629
|
},
|
8586
8630
|
labels: {
|
8587
8631
|
style: {
|
8588
|
-
fontSize:
|
8632
|
+
fontSize: "10px"
|
8589
8633
|
}
|
8590
8634
|
}
|
8591
8635
|
},
|
@@ -8607,25 +8651,30 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
8607
8651
|
max: timelyOrderQuestion[dataChartIndex] ? timelyOrderQuestion[dataChartIndex].questions.length + 1 : 1,
|
8608
8652
|
axisBorder: {
|
8609
8653
|
show: true,
|
8610
|
-
color:
|
8654
|
+
color: "#E4E7EC"
|
8611
8655
|
},
|
8612
8656
|
labels: {
|
8613
8657
|
formatter: function formatter(val) {
|
8614
|
-
|
8658
|
+
var _timelyOrderQuestion$2, _questions$length2, _questions2;
|
8659
|
+
var questions = ((_timelyOrderQuestion$2 = timelyOrderQuestion[dataChartIndex]) === null || _timelyOrderQuestion$2 === void 0 ? void 0 : _timelyOrderQuestion$2.questions) || null;
|
8660
|
+
var questionLength = (_questions$length2 = questions === null || questions === void 0 ? void 0 : questions.length) != null ? _questions$length2 : 0;
|
8661
|
+
return val != null ? t("problem_number_question", {
|
8662
|
+
number: questions !== null ? ((_questions2 = questions[questionLength - val]) === null || _questions2 === void 0 ? void 0 : _questions2.questionOrder) + 1 : val
|
8663
|
+
}) : t("no_data");
|
8615
8664
|
},
|
8616
8665
|
style: {
|
8617
|
-
fontSize:
|
8666
|
+
fontSize: "10px"
|
8618
8667
|
}
|
8619
8668
|
}
|
8620
8669
|
}
|
8621
8670
|
};
|
8622
|
-
}, [JSON.stringify(timelyOrderQuestion
|
8671
|
+
}, [JSON.stringify(timelyOrderQuestion), dataChartIndex, language]);
|
8623
8672
|
var series = useMemo(function () {
|
8624
8673
|
if (!timelyOrderQuestion.length || timelyOrderQuestion.length < dataChartIndex + 1 || dataChartIndex < 0) return [{
|
8625
|
-
name: "
|
8674
|
+
name: t("my_problem_solving_order"),
|
8626
8675
|
data: []
|
8627
8676
|
}, {
|
8628
|
-
name: "
|
8677
|
+
name: t("top_rankings_problem_solving_order"),
|
8629
8678
|
data: []
|
8630
8679
|
}];
|
8631
8680
|
var data = timelyOrderQuestion[dataChartIndex];
|
@@ -8639,23 +8688,23 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
8639
8688
|
});
|
8640
8689
|
});
|
8641
8690
|
var mySeriesData = [null].concat(questionsData.sort(function (a, b) {
|
8642
|
-
return a.answerOrder > b.answerOrder ? 1 : b.answerOrder > a.answerOrder ? -1 : 0;
|
8691
|
+
return b.answerOrder === 0 ? -1 : a.answerOrder > b.answerOrder ? 1 : b.answerOrder > a.answerOrder ? -1 : 0;
|
8643
8692
|
}).map(function (item) {
|
8644
|
-
return data.questions.length - item.questionOrder;
|
8693
|
+
return item.answerOrder === 0 ? null : data.questions.length - item.questionOrder;
|
8645
8694
|
}), [null]);
|
8646
8695
|
var topSeriesData = [null].concat(questionsData.sort(function (a, b) {
|
8647
|
-
return a.topAnswerOrder > b.topAnswerOrder ? 1 : b.topAnswerOrder > a.topAnswerOrder ? -1 : 0;
|
8696
|
+
return b.topAnswerOrder === 0 ? -1 : a.topAnswerOrder > b.topAnswerOrder ? 1 : b.topAnswerOrder > a.topAnswerOrder ? -1 : 0;
|
8648
8697
|
}).map(function (item) {
|
8649
|
-
return item.topAnswerOrder
|
8698
|
+
return item.topAnswerOrder === 0 ? null : data.questions.length - item.questionOrder;
|
8650
8699
|
}), [null]);
|
8651
8700
|
return [{
|
8652
|
-
name: "
|
8701
|
+
name: t("my_problem_solving_order"),
|
8653
8702
|
data: mySeriesData
|
8654
8703
|
}, {
|
8655
|
-
name: "
|
8704
|
+
name: t("top_rankings_problem_solving_order"),
|
8656
8705
|
data: topSeriesData
|
8657
8706
|
}];
|
8658
|
-
}, [JSON.stringify(timelyOrderQuestion), dataChartIndex]);
|
8707
|
+
}, [JSON.stringify(timelyOrderQuestion), dataChartIndex, language]);
|
8659
8708
|
var handleExportPdf = function handleExportPdf() {
|
8660
8709
|
try {
|
8661
8710
|
var canvas = document.querySelector("#canvas");
|
@@ -9814,33 +9863,6 @@ var ReactApexChart = unwrapExports(reactApexcharts_min);
|
|
9814
9863
|
|
9815
9864
|
var styles$2 = {"titleBox":"_1dveO","title":"_mxRxf","point":"_2fD-F","buttonGroup":"_2DGl3","btnFeedback":"_xGW1x","btnTerminate":"_3mLu2","myanswer":"_eDBpS","titleMyAnswer1":"_2fMq3","titleMyAnswer2":"_3gEYh","contentMyAnswer":"_2K_sx","myAnswerItem":"_2qiLh","time":"_6TCOK","timeCol":"_hmseC","answer-response":"_3GfJt","answer-response-0":"_3ut64","answer-response-1":"_2VtpD","answer-response-2":"_58lQU","answer-response-3":"_1ucMY","answer-response-4":"_1qkxy","answerCorrect":"_2jIeT","answerIncorrect":"_to2v0","answerNograss":"_1JSte","answerEasy":"_2_uTU","answerDiscrimination":"_1DBoA","answerTrap":"_1q3tD","answerNoTime":"_3iItu","questionOrder":"_1fNkS","myTimeLabel":"_1Z_F3","myPoolTime":"_4KwG0","topTimeLabel":"_245H-","topTime":"_3tZqw","meanTimeLabel":"_PlPLY","meanTime":"_12a7R","compareChart":"_3MW16","prevChart":"_1fNkb","chart":"_3K4oY","nextChart":"_3YKBp","titleChart":"_13BVP","compareGrass":"_1_fJu","titleCompareGrass":"_o1txm","tableCompareGrass":"_bT5nf","thcolumn1":"_3Umg0","tdcolumn1":"_3dRMF","tdcolumn3":"_2tcBP","classification":"_1AFeb","wrapperProblem":"_oTqG7","titleProblem":"_35eIx","titleProblemClose":"_3t4HO","titleTrickyProblem":"_1-oxK","wrongQuestions":"_2dpMR","question":"_1lSOX","assignedQuestions":"_1ONUt","wrapperContent":"_nPoR0","content":"_2zmZn","contentColumn1":"_334SY","span1":"_3Lf-U","span2":"_ZpMot","contentColumn2":"_16P3l","duration":"_1kT28","topDuration":"_1fVRi","overallCorrectRate":"_3jLGe","answer":"_VsZ0K","contentVulnerable":"_QxKMy","wrappContentProblem":"_nnqpW","contentProblem":"_3Z1nV","labelProblem":"_36Xpx","name":"_3ZJQW","percent":"_2J3MK","slider":"_1MPdO","track":"_3CV_y","noData":"__g-ff","loading":"_3j485","table-responsive":"_2O6RX","form-label":"_1RYOQ","form-control":"_3VRVT","form-label-dialog":"_3oCSh","btn-cancel":"_3USKq","btn-register":"_3y_iD","pdfBtnBox":"_3xZHo","pdfBtn":"_1DtWq","form-select":"_1a_vw"};
|
9816
9865
|
|
9817
|
-
var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
9818
|
-
var uniqueCategories = new Set();
|
9819
|
-
var filterCategories = categories.filter(function (category) {
|
9820
|
-
if (!uniqueCategories.has(category.name)) {
|
9821
|
-
uniqueCategories.add(category.name);
|
9822
|
-
return true;
|
9823
|
-
}
|
9824
|
-
return false;
|
9825
|
-
});
|
9826
|
-
var questionsByCategory = filterCategories.map(function (category) {
|
9827
|
-
return {
|
9828
|
-
category: category,
|
9829
|
-
questions: inputData.questions.filter(function (question) {
|
9830
|
-
return question.category.name === category.name;
|
9831
|
-
})
|
9832
|
-
};
|
9833
|
-
});
|
9834
|
-
return questionsByCategory;
|
9835
|
-
};
|
9836
|
-
var formatTimeSecond = function formatTimeSecond(duration, t) {
|
9837
|
-
duration = Math.round(duration);
|
9838
|
-
return "" + (duration < 60 ? "" + duration + t("seconds") : t("mins_mins_seconds_seconds", {
|
9839
|
-
mins: Math.floor(duration / 60),
|
9840
|
-
seconds: duration % 60
|
9841
|
-
}));
|
9842
|
-
};
|
9843
|
-
|
9844
9866
|
var iconStarQuestion = function iconStarQuestion(_ref) {
|
9845
9867
|
var _ref$width = _ref.width,
|
9846
9868
|
width = _ref$width === void 0 ? "15" : _ref$width,
|
@@ -10130,7 +10152,7 @@ function CreateNewQuestionDialog(_ref) {
|
|
10130
10152
|
padding: "24px 24px 40px 24px"
|
10131
10153
|
}, React.createElement(Stack, null, React.createElement("label", {
|
10132
10154
|
htmlFor: "questions",
|
10133
|
-
className:
|
10155
|
+
className: styleGlobal['form-label'] + " " + styles$2['form-label-dialog']
|
10134
10156
|
}, "\uC9C8\uBB38\uD560 \uBB38\uC81C"), React.createElement(Field, {
|
10135
10157
|
as: "select",
|
10136
10158
|
id: "questions",
|
@@ -10138,7 +10160,7 @@ function CreateNewQuestionDialog(_ref) {
|
|
10138
10160
|
style: {
|
10139
10161
|
width: "100%"
|
10140
10162
|
},
|
10141
|
-
className: "" +
|
10163
|
+
className: "" + styleGlobal['form-select']
|
10142
10164
|
}, questions === null || questions === void 0 ? void 0 : questions.map(function (question) {
|
10143
10165
|
return React.createElement("option", {
|
10144
10166
|
value: question === null || question === void 0 ? void 0 : question.id
|
@@ -10147,7 +10169,7 @@ function CreateNewQuestionDialog(_ref) {
|
|
10147
10169
|
}));
|
10148
10170
|
}))), React.createElement(Stack, null, React.createElement("label", {
|
10149
10171
|
htmlFor: "content-question",
|
10150
|
-
className:
|
10172
|
+
className: styleGlobal['form-label'] + " " + styles$2['form-label-dialog']
|
10151
10173
|
}, "\uC9C8\uBB38 \uB0B4\uC6A9"), React.createElement(Box, {
|
10152
10174
|
position: 'relative',
|
10153
10175
|
display: 'flex',
|
@@ -10160,7 +10182,7 @@ function CreateNewQuestionDialog(_ref) {
|
|
10160
10182
|
},
|
10161
10183
|
name: "content",
|
10162
10184
|
placeholder: "\uBB38\uC81C\uAC00 \uC5B4\uB824\uC6CC\uC694",
|
10163
|
-
className:
|
10185
|
+
className: styleGlobal['form-control']
|
10164
10186
|
}), (errors === null || errors === void 0 ? void 0 : errors.content) && React.createElement(Box, {
|
10165
10187
|
position: 'absolute',
|
10166
10188
|
right: 0,
|
@@ -10230,9 +10252,9 @@ function MyAnswer(_ref) {
|
|
10230
10252
|
bgcolor: "#F9FAFB",
|
10231
10253
|
flexDirection: "row",
|
10232
10254
|
padding: "12px",
|
10233
|
-
className: styles$2["myAnswerItem"] + " " +
|
10255
|
+
className: styles$2["myAnswerItem"] + " " + styleGlobal["noGutters"]
|
10234
10256
|
}, React.createElement("div", {
|
10235
|
-
className:
|
10257
|
+
className: styleGlobal["custom-col-2"],
|
10236
10258
|
style: {
|
10237
10259
|
display: "flex",
|
10238
10260
|
gap: "4px"
|
@@ -10244,7 +10266,7 @@ function MyAnswer(_ref) {
|
|
10244
10266
|
color: "#97A1AF"
|
10245
10267
|
}
|
10246
10268
|
}, "\uBB38\uC81C \uBC88\uD638")), React.createElement("div", {
|
10247
|
-
className:
|
10269
|
+
className: styleGlobal["custom-col-2"],
|
10248
10270
|
style: {
|
10249
10271
|
display: "flex",
|
10250
10272
|
gap: "4px"
|
@@ -10256,7 +10278,7 @@ function MyAnswer(_ref) {
|
|
10256
10278
|
color: "#97A1AF"
|
10257
10279
|
}
|
10258
10280
|
}, "\uC815\uB2F5")), React.createElement("div", {
|
10259
|
-
className:
|
10281
|
+
className: styleGlobal["custom-col-2"],
|
10260
10282
|
style: {
|
10261
10283
|
display: "flex",
|
10262
10284
|
gap: "4px"
|
@@ -10268,7 +10290,7 @@ function MyAnswer(_ref) {
|
|
10268
10290
|
color: "#97A1AF"
|
10269
10291
|
}
|
10270
10292
|
}, "\uD480\uC774 \uC2DC\uAC04")), React.createElement("div", {
|
10271
|
-
className:
|
10293
|
+
className: styleGlobal["custom-col-2"],
|
10272
10294
|
style: {
|
10273
10295
|
display: "flex",
|
10274
10296
|
alignItems: "center",
|
@@ -10281,7 +10303,7 @@ function MyAnswer(_ref) {
|
|
10281
10303
|
color: "#97A1AF"
|
10282
10304
|
}
|
10283
10305
|
}, "\uC0C1\uC704\uAD8C \uBE44\uAD50")), React.createElement("div", {
|
10284
|
-
className:
|
10306
|
+
className: styleGlobal["custom-col-2"],
|
10285
10307
|
style: {
|
10286
10308
|
display: "flex",
|
10287
10309
|
alignItems: "center",
|
@@ -10316,9 +10338,9 @@ function MyAnswer(_ref) {
|
|
10316
10338
|
} : {},
|
10317
10339
|
key: question.id
|
10318
10340
|
}, React.createElement("div", {
|
10319
|
-
className: styles$2["myAnswerItem"] + " " +
|
10341
|
+
className: styles$2["myAnswerItem"] + " " + styleGlobal["noGutters"]
|
10320
10342
|
}, React.createElement("div", {
|
10321
|
-
className:
|
10343
|
+
className: styleGlobal["custom-col-2"],
|
10322
10344
|
style: {
|
10323
10345
|
display: "flex",
|
10324
10346
|
alignItems: "center",
|
@@ -10328,7 +10350,7 @@ function MyAnswer(_ref) {
|
|
10328
10350
|
}, question.isStar ? React.createElement(iconStarQuestion, null) : React.createElement(iconNoStarQuestion, null), React.createElement("span", {
|
10329
10351
|
className: styles$2["questionOrder"]
|
10330
10352
|
}, question.questionOrder + 1, "\uBC88")), React.createElement("div", {
|
10331
|
-
className:
|
10353
|
+
className: styleGlobal["custom-col-2"],
|
10332
10354
|
style: {
|
10333
10355
|
display: "flex",
|
10334
10356
|
alignItems: "center",
|
@@ -10341,7 +10363,7 @@ function MyAnswer(_ref) {
|
|
10341
10363
|
}, "\uC624\uB2F5")), question.selectedAnswers === "" && React.createElement(Fragment$1, null, React.createElement(iconNoGrass, null), React.createElement("span", {
|
10342
10364
|
className: styles$2["answerNograss"]
|
10343
10365
|
}, "\uD480\uC774 \uC5C6\uC74C"))), React.createElement("div", {
|
10344
|
-
className:
|
10366
|
+
className: styleGlobal["custom-col-2"],
|
10345
10367
|
style: {
|
10346
10368
|
display: "flex",
|
10347
10369
|
alignItems: "center"
|
@@ -10357,7 +10379,7 @@ function MyAnswer(_ref) {
|
|
10357
10379
|
},
|
10358
10380
|
className: styles$2["answerNoTime"]
|
10359
10381
|
}, "\uC2DC\uAC04 \uC5C6\uC74C")), React.createElement("div", {
|
10360
|
-
className:
|
10382
|
+
className: styleGlobal["custom-col-2"],
|
10361
10383
|
style: {
|
10362
10384
|
display: "flex",
|
10363
10385
|
alignItems: "center"
|
@@ -10374,7 +10396,7 @@ function MyAnswer(_ref) {
|
|
10374
10396
|
},
|
10375
10397
|
className: styles$2["answerNoTime"]
|
10376
10398
|
}, "-")), React.createElement("div", {
|
10377
|
-
className:
|
10399
|
+
className: styleGlobal["custom-col-2"],
|
10378
10400
|
style: {
|
10379
10401
|
display: "flex",
|
10380
10402
|
alignItems: "center"
|
@@ -10390,7 +10412,7 @@ function MyAnswer(_ref) {
|
|
10390
10412
|
},
|
10391
10413
|
className: styles$2["answerNoTime"]
|
10392
10414
|
}, "\uC2DC\uAC04 \uC5C6\uC74C")), isStudent && React.createElement("div", {
|
10393
|
-
className:
|
10415
|
+
className: styleGlobal["custom-col-2"],
|
10394
10416
|
style: {
|
10395
10417
|
display: "flex",
|
10396
10418
|
alignItems: "center",
|
@@ -10914,7 +10936,7 @@ function CreateNewQuestionDialog$1(_ref) {
|
|
10914
10936
|
var errors = _ref2.errors;
|
10915
10937
|
return React.createElement(Form, null, React.createElement("label", {
|
10916
10938
|
htmlFor: "content-question",
|
10917
|
-
className:
|
10939
|
+
className: styleGlobal['form-label'] + " " + styles$2['form-label-dialog']
|
10918
10940
|
}, "\uC9C8\uBB38 \uB0B4\uC6A9"), React.createElement(Box, {
|
10919
10941
|
position: 'relative',
|
10920
10942
|
display: 'flex',
|
@@ -10927,7 +10949,7 @@ function CreateNewQuestionDialog$1(_ref) {
|
|
10927
10949
|
},
|
10928
10950
|
name: "content",
|
10929
10951
|
placeholder: "\uBB38\uC81C\uAC00 \uC5B4\uB824\uC6CC\uC694",
|
10930
|
-
className:
|
10952
|
+
className: styleGlobal['form-control']
|
10931
10953
|
}), (errors === null || errors === void 0 ? void 0 : errors.content) && React.createElement(Box, {
|
10932
10954
|
position: 'absolute',
|
10933
10955
|
right: 0,
|
@@ -11162,6 +11184,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
11162
11184
|
var label = _ref2.label,
|
11163
11185
|
value = _ref2.value;
|
11164
11186
|
return React.createElement(Button, {
|
11187
|
+
className: styleGlobal["truncate"],
|
11165
11188
|
disableTouchRipple: true,
|
11166
11189
|
sx: {
|
11167
11190
|
fontSize: "14px",
|
@@ -11181,7 +11204,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
11181
11204
|
}, React.createElement("div", {
|
11182
11205
|
className: styles$2["pdfBtnBox"]
|
11183
11206
|
}, React.createElement("button", {
|
11184
|
-
className: styles$2["pdfBtn"],
|
11207
|
+
className: styles$2["pdfBtn"] + " " + styleGlobal["truncate"],
|
11185
11208
|
onClick: handleExportPdf
|
11186
11209
|
}, React.createElement(iconPrintFill, null), React.createElement("p", null, t("print"))))))), React.createElement(Grid, {
|
11187
11210
|
item: true,
|