touchstudy-core 0.1.81 → 0.1.82

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.
@@ -2581,6 +2581,7 @@ var your_browser_must = "귀하의 브라우저는 다음을 충족해야 합니
2581
2581
  var allowed_to_send_pop_ups_and_use_redirects = "팝업 보내기 및 리디렉션 사용이 허용됨";
2582
2582
  var disable_ask_where_to_save_each_file_before_downloading = "다운로드하기 전에 각 파일을 저장할 위치 묻기 비활성화";
2583
2583
  var total_number_of_selected_results = "선택된 결과의 총 개수";
2584
+ var choose_to_print = "인쇄를 선택하세요";
2584
2585
  var lang_ko = {
2585
2586
  problem_solving: problem_solving,
2586
2587
  my_story: my_story,
@@ -3353,7 +3354,8 @@ var lang_ko = {
3353
3354
  your_browser_must: your_browser_must,
3354
3355
  allowed_to_send_pop_ups_and_use_redirects: allowed_to_send_pop_ups_and_use_redirects,
3355
3356
  disable_ask_where_to_save_each_file_before_downloading: disable_ask_where_to_save_each_file_before_downloading,
3356
- total_number_of_selected_results: total_number_of_selected_results
3357
+ total_number_of_selected_results: total_number_of_selected_results,
3358
+ choose_to_print: choose_to_print
3357
3359
  };
3358
3360
 
3359
3361
  var problem_solving$1 = "Problem Solving";
@@ -4136,6 +4138,7 @@ var your_browser_must$1 = "Your browser must";
4136
4138
  var allowed_to_send_pop_ups_and_use_redirects$1 = "Allowed to send pop-ups and use redirects";
4137
4139
  var disable_ask_where_to_save_each_file_before_downloading$1 = "Disable ask where to save each file before downloading";
4138
4140
  var total_number_of_selected_results$1 = "Total number of selected results";
4141
+ var choose_to_print$1 = "Choose to print";
4139
4142
  var lang_en = {
4140
4143
  problem_solving: problem_solving$1,
4141
4144
  my_story: my_story$1,
@@ -4909,7 +4912,8 @@ var lang_en = {
4909
4912
  your_browser_must: your_browser_must$1,
4910
4913
  allowed_to_send_pop_ups_and_use_redirects: allowed_to_send_pop_ups_and_use_redirects$1,
4911
4914
  disable_ask_where_to_save_each_file_before_downloading: disable_ask_where_to_save_each_file_before_downloading$1,
4912
- total_number_of_selected_results: total_number_of_selected_results$1
4915
+ total_number_of_selected_results: total_number_of_selected_results$1,
4916
+ choose_to_print: choose_to_print$1
4913
4917
  };
4914
4918
 
4915
4919
  i18n.use(initReactI18next).init({
@@ -10870,6 +10874,7 @@ var EXAM_RESULT = {
10870
10874
  topDuration: 180.939,
10871
10875
  answerResponseSignal: 0,
10872
10876
  isCorrect: false,
10877
+ score: 2,
10873
10878
  answerTime: "2024-03-13T04:29:00.685+00:00",
10874
10879
  article: 1,
10875
10880
  category: {
@@ -10891,6 +10896,7 @@ var EXAM_RESULT = {
10891
10896
  classAverageTime: 2.014,
10892
10897
  topDuration: 2.014,
10893
10898
  answerResponseSignal: 1,
10899
+ score: 2,
10894
10900
  isCorrect: false,
10895
10901
  answerTime: "2024-03-13T04:29:02.7+00:00",
10896
10902
  article: 1,
@@ -10913,6 +10919,7 @@ var EXAM_RESULT = {
10913
10919
  classAverageTime: 52.244,
10914
10920
  topDuration: 24.244,
10915
10921
  answerResponseSignal: 1,
10922
+ score: 2,
10916
10923
  isCorrect: false,
10917
10924
  answerTime: "2024-03-13T04:29:04.944+00:00",
10918
10925
  article: 1,
@@ -10935,6 +10942,7 @@ var EXAM_RESULT = {
10935
10942
  classAverageTime: 1.373,
10936
10943
  topDuration: 1.373,
10937
10944
  answerResponseSignal: 4,
10945
+ score: 2,
10938
10946
  isCorrect: true,
10939
10947
  answerTime: "2024-03-13T04:29:06.317+00:00",
10940
10948
  article: 1,
@@ -10957,6 +10965,7 @@ var EXAM_RESULT = {
10957
10965
  classAverageTime: 132.683,
10958
10966
  topDuration: 110.683,
10959
10967
  answerResponseSignal: 2,
10968
+ score: 2,
10960
10969
  isCorrect: false,
10961
10970
  answerTime: "2024-03-13T04:29:07+00:00",
10962
10971
  article: 1,
@@ -10979,6 +10988,7 @@ var EXAM_RESULT = {
10979
10988
  classAverageTime: 1.052,
10980
10989
  topDuration: 1.052,
10981
10990
  answerResponseSignal: 1,
10991
+ score: 2,
10982
10992
  isCorrect: true,
10983
10993
  answerTime: "2024-03-13T04:29:08.052+00:00",
10984
10994
  article: 2,
@@ -11001,6 +11011,7 @@ var EXAM_RESULT = {
11001
11011
  classAverageTime: 0,
11002
11012
  topDuration: null,
11003
11013
  answerResponseSignal: null,
11014
+ score: 2,
11004
11015
  isCorrect: false,
11005
11016
  answerTime: "0001-01-01T00:00:00+00:00",
11006
11017
  article: 2,
@@ -11023,6 +11034,7 @@ var EXAM_RESULT = {
11023
11034
  classAverageTime: 2.596,
11024
11035
  topDuration: 2.596,
11025
11036
  answerResponseSignal: 1,
11037
+ score: 2,
11026
11038
  isCorrect: false,
11027
11039
  answerTime: "2024-03-13T04:29:10.648+00:00",
11028
11040
  article: 2,
@@ -11045,6 +11057,7 @@ var EXAM_RESULT = {
11045
11057
  classAverageTime: 0.899,
11046
11058
  topDuration: 0.899,
11047
11059
  answerResponseSignal: 1,
11060
+ score: 2,
11048
11061
  isCorrect: false,
11049
11062
  answerTime: "2024-03-13T04:29:12.864+00:00",
11050
11063
  article: 2,
@@ -11068,6 +11081,7 @@ var EXAM_RESULT = {
11068
11081
  topDuration: 20.496,
11069
11082
  answerResponseSignal: 0,
11070
11083
  isCorrect: true,
11084
+ score: 2,
11071
11085
  answerTime: "2024-03-13T04:29:14.36+00:00",
11072
11086
  article: 2,
11073
11087
  category: {
@@ -11089,6 +11103,7 @@ var EXAM_RESULT = {
11089
11103
  classAverageTime: 0,
11090
11104
  topDuration: null,
11091
11105
  answerResponseSignal: null,
11106
+ score: 2,
11092
11107
  isCorrect: false,
11093
11108
  answerTime: "0001-01-01T00:00:00+00:00",
11094
11109
  article: 2,
@@ -11112,6 +11127,7 @@ var EXAM_RESULT = {
11112
11127
  topDuration: 1.317,
11113
11128
  answerResponseSignal: 1,
11114
11129
  isCorrect: true,
11130
+ score: 2,
11115
11131
  answerTime: "2024-03-13T04:29:11.965+00:00",
11116
11132
  article: 3,
11117
11133
  category: {
@@ -11133,6 +11149,7 @@ var EXAM_RESULT = {
11133
11149
  classAverageTime: 1.593,
11134
11150
  topDuration: 1.593,
11135
11151
  answerResponseSignal: 1,
11152
+ score: 2,
11136
11153
  isCorrect: false,
11137
11154
  answerTime: "2024-03-13T04:29:20.734+00:00",
11138
11155
  article: 3,
@@ -11155,6 +11172,7 @@ var EXAM_RESULT = {
11155
11172
  classAverageTime: 1.204,
11156
11173
  topDuration: 1.204,
11157
11174
  answerResponseSignal: 1,
11175
+ score: 2,
11158
11176
  isCorrect: false,
11159
11177
  answerTime: "2024-03-13T04:29:18.164+00:00",
11160
11178
  article: 3,
@@ -11177,6 +11195,7 @@ var EXAM_RESULT = {
11177
11195
  classAverageTime: 2.6,
11178
11196
  topDuration: 2.6,
11179
11197
  answerResponseSignal: 1,
11198
+ score: 2,
11180
11199
  isCorrect: false,
11181
11200
  answerTime: "2024-03-13T04:29:16.96+00:00",
11182
11201
  article: 3,
@@ -11199,6 +11218,7 @@ var EXAM_RESULT = {
11199
11218
  classAverageTime: 0.977,
11200
11219
  topDuration: 0.977,
11201
11220
  answerResponseSignal: 1,
11221
+ score: 2,
11202
11222
  isCorrect: true,
11203
11223
  answerTime: "2024-03-13T04:29:19.141+00:00",
11204
11224
  article: 3,
@@ -11727,12 +11747,12 @@ var useExamResult = function useExamResult(props) {
11727
11747
  setCategoryResponses(((_result$4$data2 = result[4].data) === null || _result$4$data2 === void 0 ? void 0 : _result$4$data2.data) || []);
11728
11748
  return isStudent ? _temp3(!isStudent && createRecentUserActionListApi({
11729
11749
  userId: studentId,
11730
- action: RecentUserAction$1.ViewedExamResult,
11750
+ action: isPrint ? RecentUserAction$1.PrintedExamResult : RecentUserAction$1.ViewedExamResult,
11731
11751
  data: "" + examSessionId,
11732
11752
  roles: [Role.Teacher]
11733
11753
  })) : Promise.resolve(!isStudent && createRecentUserActionListApi({
11734
11754
  userId: studentId,
11735
- action: RecentUserAction$1.ViewedExamResult,
11755
+ action: isPrint ? RecentUserAction$1.PrintedExamResult : RecentUserAction$1.ViewedExamResult,
11736
11756
  data: "" + examSessionId,
11737
11757
  roles: [Role.Teacher]
11738
11758
  })).then(_temp3);
@@ -14696,7 +14716,7 @@ var usePrintExamResult = function usePrintExamResult(isDataFetching, fileName, t
14696
14716
  var autoPrintPdf = function autoPrintPdf() {
14697
14717
  if (printState === PrintState.Printing) return;
14698
14718
  if (autoPrint && printState !== PrintState.Default) return;
14699
- if (totalChart !== renderedCharts.length) {
14719
+ if (totalChart !== 0 && totalChart !== renderedCharts.length) {
14700
14720
  !autoPrint && setPrintState(PrintState.Pending);
14701
14721
  return;
14702
14722
  }
@@ -14825,6 +14845,8 @@ var studentNameStyle = {
14825
14845
  var PrintExamResult = function PrintExamResult(_ref) {
14826
14846
  var resultData = _ref.resultData,
14827
14847
  examTime = _ref.examTime,
14848
+ status = _ref.status,
14849
+ isShow = _ref.isShow,
14828
14850
  isStudent = _ref.isStudent,
14829
14851
  categoryResponses = _ref.categoryResponses,
14830
14852
  timelyOrderQuestions = _ref.timelyOrderQuestions,
@@ -14952,7 +14974,7 @@ var PrintExamResult = function PrintExamResult(_ref) {
14952
14974
  fontWeight: 600,
14953
14975
  color: styles.gray_700
14954
14976
  }
14955
- }, resultData === null || resultData === void 0 ? void 0 : resultData.teacherName)))))), React__default.createElement(Stack, {
14977
+ }, resultData === null || resultData === void 0 ? void 0 : resultData.teacherName)))))), (!status || (isShow === null || isShow === void 0 ? void 0 : isShow(TabList[0].value))) && React__default.createElement(Stack, {
14956
14978
  display: "flex",
14957
14979
  flexDirection: "column",
14958
14980
  gap: "12px"
@@ -14962,7 +14984,7 @@ var PrintExamResult = function PrintExamResult(_ref) {
14962
14984
  data: resultData,
14963
14985
  categories: categoryResponses,
14964
14986
  isStudent: isStudent
14965
- })), React__default.createElement(Stack, {
14987
+ })), (!status || (isShow === null || isShow === void 0 ? void 0 : isShow(TabList[1].value))) && React__default.createElement(Stack, {
14966
14988
  display: "flex",
14967
14989
  flexDirection: "column",
14968
14990
  gap: "12px",
@@ -14989,7 +15011,7 @@ var PrintExamResult = function PrintExamResult(_ref) {
14989
15011
  series: allSeries[index],
14990
15012
  setIsRendered: setRenderedChart
14991
15013
  });
14992
- })), React__default.createElement(Stack, {
15014
+ })), (!status || (isShow === null || isShow === void 0 ? void 0 : isShow(TabList[2].value))) && React__default.createElement(Stack, {
14993
15015
  display: "flex",
14994
15016
  flexDirection: "column",
14995
15017
  gap: "12px",
@@ -14998,7 +15020,7 @@ var PrintExamResult = function PrintExamResult(_ref) {
14998
15020
  sx: textStyle
14999
15021
  }, t$1(TabList[2].label)), React__default.createElement(CompareGrass, {
15000
15022
  effectSize: effectSize
15001
- })), React__default.createElement(Stack, {
15023
+ })), (!status || (isShow === null || isShow === void 0 ? void 0 : isShow(TabList[3].value))) && React__default.createElement(Stack, {
15002
15024
  display: "flex",
15003
15025
  flexDirection: "column",
15004
15026
  gap: "12px",
@@ -16617,6 +16639,15 @@ var usePrintView = function usePrintView(_ref) {
16617
16639
  var _useState = useState(false),
16618
16640
  isDone = _useState[0],
16619
16641
  setDone = _useState[1];
16642
+ var _useLocation = useLocation(),
16643
+ search = _useLocation.search;
16644
+ var query = new URLSearchParams(search);
16645
+ var status = query.get('status') || '';
16646
+ var isShow = function isShow(value) {
16647
+ return (status === null || status === void 0 ? void 0 : status.split(',').some(function (i) {
16648
+ return i === value.toString();
16649
+ })) || false;
16650
+ };
16620
16651
  var handelPrintSuccess = function handelPrintSuccess() {
16621
16652
  var _window$opener$postMe, _window$opener;
16622
16653
  var data;
@@ -16663,6 +16694,8 @@ var usePrintView = function usePrintView(_ref) {
16663
16694
  return {
16664
16695
  fileName: fileName,
16665
16696
  isDone: isDone,
16697
+ status: status,
16698
+ isShow: isShow,
16666
16699
  handelPrintSuccess: handelPrintSuccess,
16667
16700
  handelPrintError: handelPrintError
16668
16701
  };
@@ -16731,9 +16764,11 @@ var PrintExamResultView = function PrintExamResultView(_ref) {
16731
16764
  }),
16732
16765
  fileName = _usePrintView.fileName,
16733
16766
  isDone = _usePrintView.isDone,
16767
+ status = _usePrintView.status,
16768
+ isShow = _usePrintView.isShow,
16734
16769
  handelPrintSuccess = _usePrintView.handelPrintSuccess,
16735
16770
  handelPrintError = _usePrintView.handelPrintError;
16736
- var _usePrintExamResult = usePrintExamResult(isLoading, fileName, timelyOrderQuestions.length, handelPrintSuccess, handelPrintError, true),
16771
+ var _usePrintExamResult = usePrintExamResult(isLoading, fileName, !status || isShow !== null && isShow !== void 0 && isShow(TabList[1].value) ? timelyOrderQuestions.length : 0, handelPrintSuccess, handelPrintError, true),
16737
16772
  contentRef = _usePrintExamResult.contentRef,
16738
16773
  setRenderedChart = _usePrintExamResult.setRenderedChart;
16739
16774
  var isTabletUp = useMediaQuery("(min-width:900px)");
@@ -16756,6 +16791,8 @@ var PrintExamResultView = function PrintExamResultView(_ref) {
16756
16791
  timelyOrderQuestions: timelyOrderQuestions,
16757
16792
  isMyStoryStudent: isMyStoryStudent,
16758
16793
  fileName: fileName,
16794
+ isShow: isShow,
16795
+ status: status,
16759
16796
  setRenderedChart: setRenderedChart
16760
16797
  }) : isLoading === undefined || isLoading === true ? React__default.createElement(LoadingComponent, {
16761
16798
  isLoading: !!isLoading,
@@ -16778,6 +16815,20 @@ var PrintState$1;
16778
16815
  PrintState[PrintState["Paused"] = 3] = "Paused";
16779
16816
  })(PrintState$1 || (PrintState$1 = {}));
16780
16817
 
16818
+ var TabList$1 = [{
16819
+ label: "comprehensive_analysis",
16820
+ value: 0
16821
+ }, {
16822
+ label: "solution_order",
16823
+ value: 1
16824
+ }, {
16825
+ label: "compare_solution",
16826
+ value: 2
16827
+ }, {
16828
+ label: "problem_analysis",
16829
+ value: 3
16830
+ }];
16831
+
16781
16832
  var TOTAL = 3;
16782
16833
  var PrintExamView2 = function PrintExamView2(_ref) {
16783
16834
  var history = _ref.history,
@@ -16812,7 +16863,23 @@ var PrintExamView2 = function PrintExamView2(_ref) {
16812
16863
  var _useState5 = useState([]),
16813
16864
  errorLinks = _useState5[0],
16814
16865
  setErrorLinks = _useState5[1];
16866
+ var _useState6 = useState([]),
16867
+ status = _useState6[0],
16868
+ setStatus = _useState6[1];
16815
16869
  var theme = useTheme();
16870
+ var handleChangeStatus = function handleChangeStatus(event) {
16871
+ if (event.target.checked) {
16872
+ setStatus(function (prev) {
16873
+ var _event$target;
16874
+ return [].concat(prev, [(_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value]);
16875
+ });
16876
+ } else setStatus(function (prev) {
16877
+ return prev === null || prev === void 0 ? void 0 : prev.filter(function (i) {
16878
+ var _event$target2;
16879
+ return i !== ((_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.value);
16880
+ });
16881
+ });
16882
+ };
16816
16883
  var handleProgressPrint = function handleProgressPrint() {
16817
16884
  setData(dataProps);
16818
16885
  setCompleted([]);
@@ -16820,6 +16887,9 @@ var PrintExamView2 = function PrintExamView2(_ref) {
16820
16887
  setErrorLinks([]);
16821
16888
  setState(PrintState$1.Printing);
16822
16889
  };
16890
+ console.log({
16891
+ status: status
16892
+ });
16823
16893
  var print = function print(_ref2) {
16824
16894
  var examSessionId = _ref2.examSessionId,
16825
16895
  studentId = _ref2.studentId,
@@ -16828,7 +16898,7 @@ var PrintExamView2 = function PrintExamView2(_ref) {
16828
16898
  var height = 200;
16829
16899
  var left = window.screenX + window.outerWidth / 2 - width / 2;
16830
16900
  var top = window.screenY + window.outerHeight / 2 - height / 2;
16831
- var url = isTeacher ? window.location.origin + "/teacher/exam-results/" + examSessionId + "/students/" + studentId + "/print" : window.location.origin + "/student/exam-results/" + code + "/print";
16901
+ var url = isTeacher ? window.location.origin + "/teacher/exam-results/" + examSessionId + "/students/" + studentId + "/print?status=" + status.join(",") : window.location.origin + "/student/exam-results/" + code + "/print";
16832
16902
  var windowName = isTeacher ? "popup-" + examSessionId + "-" + studentId : "popup-" + code;
16833
16903
  var windowSpecs = "left=" + left + ",top=" + top + ",width=" + width + ",height=" + height + ",location=yes,resizable=yes,scrollbars=yes,status=yes";
16834
16904
  var childWindow = window.open(url, windowName, windowSpecs);
@@ -16990,7 +17060,29 @@ var PrintExamView2 = function PrintExamView2(_ref) {
16990
17060
  disablePadding: true
16991
17061
  }, t("allowed_to_send_pop_ups_and_use_redirects")), React__default.createElement(ListItem, {
16992
17062
  disablePadding: true
16993
- }, t("disable_ask_where_to_save_each_file_before_downloading")))), React__default.createElement(Button, {
17063
+ }, t("disable_ask_where_to_save_each_file_before_downloading")))), isTeacher && React__default.createElement(Stack, null, React__default.createElement(Typography, {
17064
+ fontWeight: 700
17065
+ }, t("choose_to_print"), ":"), React__default.createElement(FormGroup, {
17066
+ sx: {
17067
+ display: "flex",
17068
+ flexDirection: "row",
17069
+ gap: 1,
17070
+ flexWrap: "wrap"
17071
+ }
17072
+ }, TabList$1.map(function (_ref3) {
17073
+ var label = _ref3.label,
17074
+ value = _ref3.value;
17075
+ return React__default.createElement(FormControlLabel, {
17076
+ control: React__default.createElement(Checkbox, {
17077
+ onChange: handleChangeStatus,
17078
+ value: value,
17079
+ checked: status.some(function (i) {
17080
+ return i === value.toString();
17081
+ })
17082
+ }),
17083
+ label: t(label)
17084
+ });
17085
+ }))), React__default.createElement(Button, {
16994
17086
  className: "mt-3",
16995
17087
  variant: "contained",
16996
17088
  onClick: handleProgressPrint