touchstudy-core 0.1.38 → 0.1.40
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/components/CompareGrass/index.d.ts +6 -3
- package/dist/containers/ExamResult/components/GradesByTerritory/index.d.ts +6 -3
- package/dist/containers/ExamResult/components/MyAnswer/index.d.ts +2 -1
- package/dist/containers/ExamResult/components/ProtractedProblem/index.d.ts +6 -3
- package/dist/containers/ExamResult/components/TrickyProblem/index.d.ts +6 -3
- package/dist/containers/ExamResult/components/Vulnerable/index.d.ts +6 -3
- package/dist/containers/Login/configs/constants.d.ts +0 -6
- package/dist/containers/Login/views/block/BlockLogin.d.ts +1 -1
- package/dist/containers/Textbooks/apiClient/articleService.d.ts +1 -1
- package/dist/containers/Textbooks/apiClient/chapterService.d.ts +1 -1
- package/dist/containers/Textbooks/apiClient/textbookService.d.ts +1 -1
- package/dist/containers/Textbooks/views/TextbookDetail.d.ts +1 -1
- package/dist/containers/Textbooks/views/TextbookList.d.ts +1 -1
- package/dist/index.css +12 -5
- package/dist/index.d.ts +1 -2
- package/dist/index.js +881 -375
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +882 -376
- package/dist/index.modern.js.map +1 -1
- package/dist/layouts/Header.d.ts +1 -1
- package/dist/layouts/TheAcademyDropdown.d.ts +1 -1
- package/dist/utils/constants.d.ts +6 -2
- package/dist/utils/hooks/useSwitchAcademy.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -92,12 +92,16 @@ var encodeParams = function encodeParams(params) {
|
|
92
92
|
return encodeURIComponent(key) + "=" + encodeURIComponent(params[key]);
|
93
93
|
}).join('&');
|
94
94
|
};
|
95
|
-
var
|
96
|
-
(function (
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
95
|
+
var Role;
|
96
|
+
(function (Role) {
|
97
|
+
Role["Student"] = "Student";
|
98
|
+
Role["Teacher"] = "Teacher";
|
99
|
+
Role["Admin"] = "Admin";
|
100
|
+
Role["AcademyAdmin"] = "AcademyAdmin";
|
101
|
+
})(Role || (Role = {}));
|
102
|
+
var PrintHeaderClassName = "print-header";
|
103
|
+
var PrintContentClassName = "print-content";
|
104
|
+
var PrintContainerClassName = "print-container";
|
101
105
|
|
102
106
|
var utcToLocalTime = (function (time, FORMAT) {
|
103
107
|
if (time === DATE_MIN_VALUE || time === DATE_TIME_MIN_VALUE) return "";
|
@@ -139,25 +143,195 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
139
143
|
|
140
144
|
var styles = {"btn-login-google":"_2HqmH","block-login":"_wWIyO","box-login":"_38Lo1","btn-primary":"_rd4Uy","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","image-academy--item":"_3RDWF","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","headers":"_3xnI5","logo-container":"_3YG70","tabBox":"_1CQPn","routerBox":"_3hx2T","tabText":"_3UyhW","router-link-active":"_1TGKA","router-link":"_1AqMh","userImg":"_2RI6G","disabled-link":"_3aVHg"};
|
141
145
|
|
142
|
-
var AuthenticationMessage;
|
143
|
-
(function (AuthenticationMessage) {
|
144
|
-
AuthenticationMessage["NotAllowedToRegister"] = "NotAllowedToRegister";
|
145
|
-
AuthenticationMessage["InvalidGoogleToken"] = "InvalidGoogleToken";
|
146
|
-
})(AuthenticationMessage || (AuthenticationMessage = {}));
|
147
|
-
var Role;
|
148
|
-
(function (Role) {
|
149
|
-
Role["Student"] = "Student";
|
150
|
-
Role["Teacher"] = "Teacher";
|
151
|
-
Role["Admin"] = "Admin";
|
152
|
-
Role["AcademyAdmin"] = "AcademyAdmin";
|
153
|
-
})(Role || (Role = {}));
|
154
|
-
|
155
146
|
// A type of promise-like that resolves synchronously and supports only one observer
|
147
|
+
const _Pact = /*#__PURE__*/(function() {
|
148
|
+
function _Pact() {}
|
149
|
+
_Pact.prototype.then = function(onFulfilled, onRejected) {
|
150
|
+
const result = new _Pact();
|
151
|
+
const state = this.s;
|
152
|
+
if (state) {
|
153
|
+
const callback = state & 1 ? onFulfilled : onRejected;
|
154
|
+
if (callback) {
|
155
|
+
try {
|
156
|
+
_settle(result, 1, callback(this.v));
|
157
|
+
} catch (e) {
|
158
|
+
_settle(result, 2, e);
|
159
|
+
}
|
160
|
+
return result;
|
161
|
+
} else {
|
162
|
+
return this;
|
163
|
+
}
|
164
|
+
}
|
165
|
+
this.o = function(_this) {
|
166
|
+
try {
|
167
|
+
const value = _this.v;
|
168
|
+
if (_this.s & 1) {
|
169
|
+
_settle(result, 1, onFulfilled ? onFulfilled(value) : value);
|
170
|
+
} else if (onRejected) {
|
171
|
+
_settle(result, 1, onRejected(value));
|
172
|
+
} else {
|
173
|
+
_settle(result, 2, value);
|
174
|
+
}
|
175
|
+
} catch (e) {
|
176
|
+
_settle(result, 2, e);
|
177
|
+
}
|
178
|
+
};
|
179
|
+
return result;
|
180
|
+
};
|
181
|
+
return _Pact;
|
182
|
+
})();
|
183
|
+
|
184
|
+
// Settles a pact synchronously
|
185
|
+
function _settle(pact, state, value) {
|
186
|
+
if (!pact.s) {
|
187
|
+
if (value instanceof _Pact) {
|
188
|
+
if (value.s) {
|
189
|
+
if (state & 1) {
|
190
|
+
state = value.s;
|
191
|
+
}
|
192
|
+
value = value.v;
|
193
|
+
} else {
|
194
|
+
value.o = _settle.bind(null, pact, state);
|
195
|
+
return;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
if (value && value.then) {
|
199
|
+
value.then(_settle.bind(null, pact, state), _settle.bind(null, pact, 2));
|
200
|
+
return;
|
201
|
+
}
|
202
|
+
pact.s = state;
|
203
|
+
pact.v = value;
|
204
|
+
const observer = pact.o;
|
205
|
+
if (observer) {
|
206
|
+
observer(pact);
|
207
|
+
}
|
208
|
+
}
|
209
|
+
}
|
210
|
+
|
211
|
+
function _isSettledPact(thenable) {
|
212
|
+
return thenable instanceof _Pact && thenable.s & 1;
|
213
|
+
}
|
214
|
+
|
215
|
+
// Asynchronously iterate through an object that has a length property, passing the index as the first argument to the callback (even as the length property changes)
|
216
|
+
function _forTo(array, body, check) {
|
217
|
+
var i = -1, pact, reject;
|
218
|
+
function _cycle(result) {
|
219
|
+
try {
|
220
|
+
while (++i < array.length && (!check || !check())) {
|
221
|
+
result = body(i);
|
222
|
+
if (result && result.then) {
|
223
|
+
if (_isSettledPact(result)) {
|
224
|
+
result = result.v;
|
225
|
+
} else {
|
226
|
+
result.then(_cycle, reject || (reject = _settle.bind(null, pact = new _Pact(), 2)));
|
227
|
+
return;
|
228
|
+
}
|
229
|
+
}
|
230
|
+
}
|
231
|
+
if (pact) {
|
232
|
+
_settle(pact, 1, result);
|
233
|
+
} else {
|
234
|
+
pact = result;
|
235
|
+
}
|
236
|
+
} catch (e) {
|
237
|
+
_settle(pact || (pact = new _Pact()), 2, e);
|
238
|
+
}
|
239
|
+
}
|
240
|
+
_cycle();
|
241
|
+
return pact;
|
242
|
+
}
|
156
243
|
|
157
244
|
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
158
245
|
|
159
246
|
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
160
247
|
|
248
|
+
// Asynchronously implement a generic for loop
|
249
|
+
function _for(test, update, body) {
|
250
|
+
var stage;
|
251
|
+
for (;;) {
|
252
|
+
var shouldContinue = test();
|
253
|
+
if (_isSettledPact(shouldContinue)) {
|
254
|
+
shouldContinue = shouldContinue.v;
|
255
|
+
}
|
256
|
+
if (!shouldContinue) {
|
257
|
+
return result;
|
258
|
+
}
|
259
|
+
if (shouldContinue.then) {
|
260
|
+
stage = 0;
|
261
|
+
break;
|
262
|
+
}
|
263
|
+
var result = body();
|
264
|
+
if (result && result.then) {
|
265
|
+
if (_isSettledPact(result)) {
|
266
|
+
result = result.s;
|
267
|
+
} else {
|
268
|
+
stage = 1;
|
269
|
+
break;
|
270
|
+
}
|
271
|
+
}
|
272
|
+
if (update) {
|
273
|
+
var updateValue = update();
|
274
|
+
if (updateValue && updateValue.then && !_isSettledPact(updateValue)) {
|
275
|
+
stage = 2;
|
276
|
+
break;
|
277
|
+
}
|
278
|
+
}
|
279
|
+
}
|
280
|
+
var pact = new _Pact();
|
281
|
+
var reject = _settle.bind(null, pact, 2);
|
282
|
+
(stage === 0 ? shouldContinue.then(_resumeAfterTest) : stage === 1 ? result.then(_resumeAfterBody) : updateValue.then(_resumeAfterUpdate)).then(void 0, reject);
|
283
|
+
return pact;
|
284
|
+
function _resumeAfterBody(value) {
|
285
|
+
result = value;
|
286
|
+
do {
|
287
|
+
if (update) {
|
288
|
+
updateValue = update();
|
289
|
+
if (updateValue && updateValue.then && !_isSettledPact(updateValue)) {
|
290
|
+
updateValue.then(_resumeAfterUpdate).then(void 0, reject);
|
291
|
+
return;
|
292
|
+
}
|
293
|
+
}
|
294
|
+
shouldContinue = test();
|
295
|
+
if (!shouldContinue || (_isSettledPact(shouldContinue) && !shouldContinue.v)) {
|
296
|
+
_settle(pact, 1, result);
|
297
|
+
return;
|
298
|
+
}
|
299
|
+
if (shouldContinue.then) {
|
300
|
+
shouldContinue.then(_resumeAfterTest).then(void 0, reject);
|
301
|
+
return;
|
302
|
+
}
|
303
|
+
result = body();
|
304
|
+
if (_isSettledPact(result)) {
|
305
|
+
result = result.v;
|
306
|
+
}
|
307
|
+
} while (!result || !result.then);
|
308
|
+
result.then(_resumeAfterBody).then(void 0, reject);
|
309
|
+
}
|
310
|
+
function _resumeAfterTest(shouldContinue) {
|
311
|
+
if (shouldContinue) {
|
312
|
+
result = body();
|
313
|
+
if (result && result.then) {
|
314
|
+
result.then(_resumeAfterBody).then(void 0, reject);
|
315
|
+
} else {
|
316
|
+
_resumeAfterBody(result);
|
317
|
+
}
|
318
|
+
} else {
|
319
|
+
_settle(pact, 1, result);
|
320
|
+
}
|
321
|
+
}
|
322
|
+
function _resumeAfterUpdate() {
|
323
|
+
if (shouldContinue = test()) {
|
324
|
+
if (shouldContinue.then) {
|
325
|
+
shouldContinue.then(_resumeAfterTest).then(void 0, reject);
|
326
|
+
} else {
|
327
|
+
_resumeAfterTest(shouldContinue);
|
328
|
+
}
|
329
|
+
} else {
|
330
|
+
_settle(pact, 1, result);
|
331
|
+
}
|
332
|
+
}
|
333
|
+
}
|
334
|
+
|
161
335
|
// Asynchronously call a function and send errors to recovery continuation
|
162
336
|
function _catch(body, recover) {
|
163
337
|
try {
|
@@ -1232,7 +1406,7 @@ var useSubjectSelect = function useSubjectSelect() {
|
|
1232
1406
|
var isSuperAdmin = useSelector(function (state) {
|
1233
1407
|
var _state$common2, _state$common2$user;
|
1234
1408
|
return (state === null || state === void 0 ? void 0 : (_state$common2 = state.common) === null || _state$common2 === void 0 ? void 0 : (_state$common2$user = _state$common2.user) === null || _state$common2$user === void 0 ? void 0 : _state$common2$user.roles) || [];
|
1235
|
-
}).includes(
|
1409
|
+
}).includes(Role.Admin) && !isDomain;
|
1236
1410
|
var subjectOptions = useMemo(function () {
|
1237
1411
|
return subjectList === null || subjectList === void 0 ? void 0 : subjectList.map(function (subject) {
|
1238
1412
|
return {
|
@@ -3762,75 +3936,6 @@ var ChatItem = function ChatItem(props) {
|
|
3762
3936
|
}));
|
3763
3937
|
};
|
3764
3938
|
|
3765
|
-
var MessageSortBy;
|
3766
|
-
(function (MessageSortBy) {
|
3767
|
-
MessageSortBy["CreatedAt"] = "CreatedAt";
|
3768
|
-
})(MessageSortBy || (MessageSortBy = {}));
|
3769
|
-
var OrderBy;
|
3770
|
-
(function (OrderBy) {
|
3771
|
-
OrderBy["ASC"] = "ASC";
|
3772
|
-
OrderBy["DESC"] = "DESC";
|
3773
|
-
})(OrderBy || (OrderBy = {}));
|
3774
|
-
var StudentSortBy;
|
3775
|
-
(function (StudentSortBy) {
|
3776
|
-
StudentSortBy["CreatedAt"] = "CreatedAt";
|
3777
|
-
StudentSortBy["FullName"] = "FullName";
|
3778
|
-
})(StudentSortBy || (StudentSortBy = {}));
|
3779
|
-
var StudentOrderBy;
|
3780
|
-
(function (StudentOrderBy) {
|
3781
|
-
StudentOrderBy["ASC"] = "ASC";
|
3782
|
-
StudentOrderBy["DESC"] = "DESC";
|
3783
|
-
})(StudentOrderBy || (StudentOrderBy = {}));
|
3784
|
-
var MessageAction;
|
3785
|
-
(function (MessageAction) {
|
3786
|
-
MessageAction[MessageAction["Default"] = 0] = "Default";
|
3787
|
-
MessageAction[MessageAction["Took"] = 1] = "Took";
|
3788
|
-
})(MessageAction || (MessageAction = {}));
|
3789
|
-
var MessageSourceType;
|
3790
|
-
(function (MessageSourceType) {
|
3791
|
-
MessageSourceType[MessageSourceType["Default"] = 0] = "Default";
|
3792
|
-
MessageSourceType[MessageSourceType["Exam"] = 1] = "Exam";
|
3793
|
-
MessageSourceType[MessageSourceType["Class"] = 2] = "Class";
|
3794
|
-
})(MessageSourceType || (MessageSourceType = {}));
|
3795
|
-
var MessageStatus;
|
3796
|
-
(function (MessageStatus) {
|
3797
|
-
MessageStatus["Default"] = "Sent";
|
3798
|
-
MessageStatus["Sending"] = "Sending...";
|
3799
|
-
MessageStatus["SentError"] = "Sent fail, Retry";
|
3800
|
-
})(MessageStatus || (MessageStatus = {}));
|
3801
|
-
|
3802
|
-
var types = {
|
3803
|
-
__proto__: null,
|
3804
|
-
get MessageSortBy () { return MessageSortBy; },
|
3805
|
-
get OrderBy () { return OrderBy; },
|
3806
|
-
get StudentSortBy () { return StudentSortBy; },
|
3807
|
-
get StudentOrderBy () { return StudentOrderBy; },
|
3808
|
-
get MessageAction () { return MessageAction; },
|
3809
|
-
get MessageSourceType () { return MessageSourceType; },
|
3810
|
-
get MessageStatus () { return MessageStatus; }
|
3811
|
-
};
|
3812
|
-
|
3813
|
-
var ExamStatus;
|
3814
|
-
(function (ExamStatus) {
|
3815
|
-
ExamStatus["Default"] = "Default";
|
3816
|
-
ExamStatus["Pending"] = "Pending";
|
3817
|
-
ExamStatus["Inprogress"] = "Inprogress";
|
3818
|
-
ExamStatus["Completed"] = "Completed";
|
3819
|
-
})(ExamStatus || (ExamStatus = {}));
|
3820
|
-
var Roles$1;
|
3821
|
-
(function (Roles) {
|
3822
|
-
Roles["Student"] = "Student";
|
3823
|
-
Roles["Teacher"] = "Teacher";
|
3824
|
-
Roles["Admin"] = "Admin";
|
3825
|
-
})(Roles$1 || (Roles$1 = {}));
|
3826
|
-
var MESSAGE_DEFAULT_FILTER = {
|
3827
|
-
currentPage: 1,
|
3828
|
-
pageSize: 15,
|
3829
|
-
textSearch: "",
|
3830
|
-
sortColumnDirection: OrderBy.DESC,
|
3831
|
-
sortColumnName: MessageSortBy.CreatedAt
|
3832
|
-
};
|
3833
|
-
|
3834
3939
|
var ChatList = function ChatList(_ref) {
|
3835
3940
|
var _ref$messages = _ref.messages,
|
3836
3941
|
messages = _ref$messages === void 0 ? [] : _ref$messages,
|
@@ -3855,7 +3960,7 @@ var ChatList = function ChatList(_ref) {
|
|
3855
3960
|
});
|
3856
3961
|
});
|
3857
3962
|
}, [JSON.stringify(messages)]);
|
3858
|
-
var isStudent = roles === null || roles === void 0 ? void 0 : roles.includes(
|
3963
|
+
var isStudent = roles === null || roles === void 0 ? void 0 : roles.includes(Role.Student);
|
3859
3964
|
return React.createElement("ul", {
|
3860
3965
|
ref: listItemRef,
|
3861
3966
|
className: styles$1["list"] + " " + styles$1["padding-content"] + " d-flex h-100 flex-column mb-0 " + (!(filterMessage !== null && filterMessage !== void 0 && filterMessage.length) ? 'justify-content-center' : '')
|
@@ -4099,7 +4204,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
4099
4204
|
t = _useTranslation.t;
|
4100
4205
|
var theme = useTheme();
|
4101
4206
|
var isTabletUp = useMediaQuery(theme.breakpoints.up('lg'));
|
4102
|
-
var isStudent = roles === null || roles === void 0 ? void 0 : roles.includes(
|
4207
|
+
var isStudent = roles === null || roles === void 0 ? void 0 : roles.includes(Role.Student);
|
4103
4208
|
var filterDurationExam = useMemo(function () {
|
4104
4209
|
if (!durationExam) return;
|
4105
4210
|
return moment.duration(durationExam);
|
@@ -4413,6 +4518,75 @@ var ChatContainer = function ChatContainer(_ref) {
|
|
4413
4518
|
})));
|
4414
4519
|
};
|
4415
4520
|
|
4521
|
+
var MessageSortBy;
|
4522
|
+
(function (MessageSortBy) {
|
4523
|
+
MessageSortBy["CreatedAt"] = "CreatedAt";
|
4524
|
+
})(MessageSortBy || (MessageSortBy = {}));
|
4525
|
+
var OrderBy;
|
4526
|
+
(function (OrderBy) {
|
4527
|
+
OrderBy["ASC"] = "ASC";
|
4528
|
+
OrderBy["DESC"] = "DESC";
|
4529
|
+
})(OrderBy || (OrderBy = {}));
|
4530
|
+
var StudentSortBy;
|
4531
|
+
(function (StudentSortBy) {
|
4532
|
+
StudentSortBy["CreatedAt"] = "CreatedAt";
|
4533
|
+
StudentSortBy["FullName"] = "FullName";
|
4534
|
+
})(StudentSortBy || (StudentSortBy = {}));
|
4535
|
+
var StudentOrderBy;
|
4536
|
+
(function (StudentOrderBy) {
|
4537
|
+
StudentOrderBy["ASC"] = "ASC";
|
4538
|
+
StudentOrderBy["DESC"] = "DESC";
|
4539
|
+
})(StudentOrderBy || (StudentOrderBy = {}));
|
4540
|
+
var MessageAction;
|
4541
|
+
(function (MessageAction) {
|
4542
|
+
MessageAction[MessageAction["Default"] = 0] = "Default";
|
4543
|
+
MessageAction[MessageAction["Took"] = 1] = "Took";
|
4544
|
+
})(MessageAction || (MessageAction = {}));
|
4545
|
+
var MessageSourceType;
|
4546
|
+
(function (MessageSourceType) {
|
4547
|
+
MessageSourceType[MessageSourceType["Default"] = 0] = "Default";
|
4548
|
+
MessageSourceType[MessageSourceType["Exam"] = 1] = "Exam";
|
4549
|
+
MessageSourceType[MessageSourceType["Class"] = 2] = "Class";
|
4550
|
+
})(MessageSourceType || (MessageSourceType = {}));
|
4551
|
+
var MessageStatus;
|
4552
|
+
(function (MessageStatus) {
|
4553
|
+
MessageStatus["Default"] = "Sent";
|
4554
|
+
MessageStatus["Sending"] = "Sending...";
|
4555
|
+
MessageStatus["SentError"] = "Sent fail, Retry";
|
4556
|
+
})(MessageStatus || (MessageStatus = {}));
|
4557
|
+
|
4558
|
+
var types = {
|
4559
|
+
__proto__: null,
|
4560
|
+
get MessageSortBy () { return MessageSortBy; },
|
4561
|
+
get OrderBy () { return OrderBy; },
|
4562
|
+
get StudentSortBy () { return StudentSortBy; },
|
4563
|
+
get StudentOrderBy () { return StudentOrderBy; },
|
4564
|
+
get MessageAction () { return MessageAction; },
|
4565
|
+
get MessageSourceType () { return MessageSourceType; },
|
4566
|
+
get MessageStatus () { return MessageStatus; }
|
4567
|
+
};
|
4568
|
+
|
4569
|
+
var ExamStatus;
|
4570
|
+
(function (ExamStatus) {
|
4571
|
+
ExamStatus["Default"] = "Default";
|
4572
|
+
ExamStatus["Pending"] = "Pending";
|
4573
|
+
ExamStatus["Inprogress"] = "Inprogress";
|
4574
|
+
ExamStatus["Completed"] = "Completed";
|
4575
|
+
})(ExamStatus || (ExamStatus = {}));
|
4576
|
+
var Roles;
|
4577
|
+
(function (Roles) {
|
4578
|
+
Roles["Student"] = "Student";
|
4579
|
+
Roles["Teacher"] = "Teacher";
|
4580
|
+
Roles["Admin"] = "Admin";
|
4581
|
+
})(Roles || (Roles = {}));
|
4582
|
+
var MESSAGE_DEFAULT_FILTER = {
|
4583
|
+
currentPage: 1,
|
4584
|
+
pageSize: 15,
|
4585
|
+
textSearch: "",
|
4586
|
+
sortColumnDirection: OrderBy.DESC,
|
4587
|
+
sortColumnName: MessageSortBy.CreatedAt
|
4588
|
+
};
|
4589
|
+
|
4416
4590
|
var useMessageList = function useMessageList() {
|
4417
4591
|
var _useState = useState([]),
|
4418
4592
|
messages = _useState[0],
|
@@ -5048,7 +5222,7 @@ var useCategorySelect = function useCategorySelect(_ref) {
|
|
5048
5222
|
var isSuperAdmin = useSelector(function (state) {
|
5049
5223
|
var _state$common2, _state$common2$user;
|
5050
5224
|
return (state === null || state === void 0 ? void 0 : (_state$common2 = state.common) === null || _state$common2 === void 0 ? void 0 : (_state$common2$user = _state$common2.user) === null || _state$common2$user === void 0 ? void 0 : _state$common2$user.roles) || [];
|
5051
|
-
}).includes(
|
5225
|
+
}).includes(Role.Admin) && !isDomain;
|
5052
5226
|
var categoryOptions = useMemo(function () {
|
5053
5227
|
return categoryList === null || categoryList === void 0 ? void 0 : categoryList.map(function (category) {
|
5054
5228
|
var _category$path;
|
@@ -5788,7 +5962,7 @@ var useExam = function useExam(props) {
|
|
5788
5962
|
setExamRequest = _useState2[1];
|
5789
5963
|
var isTeacher = useSelector(function (state) {
|
5790
5964
|
var _state$common, _state$common$user;
|
5791
|
-
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.roles.includes(
|
5965
|
+
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.roles.includes(Role.Teacher);
|
5792
5966
|
});
|
5793
5967
|
var _useTranslation = useTranslation(),
|
5794
5968
|
t = _useTranslation.t;
|
@@ -8252,12 +8426,12 @@ var TabList = [{
|
|
8252
8426
|
label: "problem_analysis",
|
8253
8427
|
value: 3
|
8254
8428
|
}];
|
8255
|
-
var Roles$
|
8429
|
+
var Roles$1;
|
8256
8430
|
(function (Roles) {
|
8257
8431
|
Roles["Student"] = "Student";
|
8258
8432
|
Roles["Teacher"] = "Teacher";
|
8259
8433
|
Roles["Admin"] = "Admin";
|
8260
|
-
})(Roles$
|
8434
|
+
})(Roles$1 || (Roles$1 = {}));
|
8261
8435
|
var EXAM_RESULT = {
|
8262
8436
|
"id": 6047,
|
8263
8437
|
"teacherId": 1,
|
@@ -8949,7 +9123,7 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
8949
9123
|
var _state$common, _state$common$user;
|
8950
9124
|
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.roles) || [];
|
8951
9125
|
});
|
8952
|
-
var isStudent = roles === null || roles === void 0 ? void 0 : roles.includes(
|
9126
|
+
var isStudent = roles === null || roles === void 0 ? void 0 : roles.includes(Role.Student);
|
8953
9127
|
var examCode = query.get("examCode") || "";
|
8954
9128
|
var language = useSelector(function (state) {
|
8955
9129
|
var _state$common2;
|
@@ -9234,23 +9408,154 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
9234
9408
|
}, [JSON.stringify(timelyOrderQuestion), dataChartIndex, language]);
|
9235
9409
|
var handleExportPdf = function handleExportPdf() {
|
9236
9410
|
try {
|
9237
|
-
var
|
9238
|
-
|
9239
|
-
|
9240
|
-
|
9241
|
-
var
|
9242
|
-
|
9243
|
-
|
9244
|
-
var
|
9245
|
-
var
|
9246
|
-
|
9247
|
-
|
9248
|
-
|
9249
|
-
|
9250
|
-
|
9251
|
-
|
9411
|
+
var _temp23 = function _temp23(_result) {
|
9412
|
+
if (_exit) return _result;
|
9413
|
+
dispatch(setLoading(false));
|
9414
|
+
};
|
9415
|
+
var _exit = false;
|
9416
|
+
dispatch(setLoading(true));
|
9417
|
+
var _temp22 = _catch(function () {
|
9418
|
+
var canvas = document.querySelector("#canvas");
|
9419
|
+
var headerCanvas = document.querySelector("#header-canvas");
|
9420
|
+
if (!canvas || !headerCanvas) {
|
9421
|
+
_exit = true;
|
9422
|
+
return;
|
9423
|
+
}
|
9424
|
+
var doc = new jsPDF({
|
9425
|
+
orientation: "p",
|
9426
|
+
unit: "px",
|
9427
|
+
format: "a4"
|
9428
|
+
});
|
9429
|
+
var WIDTH_PAPER = doc.internal.pageSize.width;
|
9430
|
+
var HEIGHT_PAPER = doc.internal.pageSize.height;
|
9431
|
+
var line = 0;
|
9432
|
+
var breakPage = function breakPage() {
|
9433
|
+
doc.addPage();
|
9434
|
+
line = 20;
|
9435
|
+
};
|
9436
|
+
var imgWidth = WIDTH_PAPER;
|
9437
|
+
var chartWidth = WIDTH_PAPER - 20;
|
9438
|
+
return Promise.resolve(html2canvas(headerCanvas)).then(function (header) {
|
9439
|
+
function _temp21() {
|
9440
|
+
doc.save("download.pdf");
|
9441
|
+
}
|
9442
|
+
var imgHeaderHeight = header.height * imgWidth / header.width;
|
9443
|
+
var imgHeaderData = header.toDataURL('image/png');
|
9444
|
+
doc.addImage(imgHeaderData, 'PNG', 0, 0, imgWidth, imgHeaderHeight);
|
9445
|
+
line += imgHeaderHeight;
|
9446
|
+
if (line > HEIGHT_PAPER) breakPage();
|
9447
|
+
var _temp20 = function () {
|
9448
|
+
if (canvas && canvas.childElementCount > 0) {
|
9449
|
+
var _index = 0;
|
9450
|
+
var _temp19 = _for(function () {
|
9451
|
+
return _index < canvas.childElementCount;
|
9452
|
+
}, function () {
|
9453
|
+
return _index++;
|
9454
|
+
}, function () {
|
9455
|
+
function _temp18() {
|
9456
|
+
function _temp16() {
|
9457
|
+
line += 20;
|
9458
|
+
}
|
9459
|
+
var _temp15 = function () {
|
9460
|
+
if (printContainerEls.length) {
|
9461
|
+
var _temp14 = _forTo(printContainerEls, function (i) {
|
9462
|
+
function _temp13() {
|
9463
|
+
var printHeader = function printHeader(top) {
|
9464
|
+
if (top === void 0) {
|
9465
|
+
top = 0;
|
9466
|
+
}
|
9467
|
+
try {
|
9468
|
+
if (!printHeaderCanvas) return Promise.resolve();
|
9469
|
+
var _height = printHeaderCanvas.height * chartWidth / printHeaderCanvas.width;
|
9470
|
+
var _data = printHeaderCanvas.toDataURL('image/png');
|
9471
|
+
line += top;
|
9472
|
+
if (line + _height > HEIGHT_PAPER) breakPage();
|
9473
|
+
doc.addImage(_data, 'PNG', 10, line, chartWidth, _height);
|
9474
|
+
line += _height;
|
9475
|
+
return Promise.resolve();
|
9476
|
+
} catch (e) {
|
9477
|
+
return Promise.reject(e);
|
9478
|
+
}
|
9479
|
+
};
|
9480
|
+
return Promise.resolve(printHeader(10)).then(function () {
|
9481
|
+
var printContents = printContainerEl.querySelectorAll("." + PrintContentClassName);
|
9482
|
+
if (!printContents.length) return;
|
9483
|
+
var _temp11 = _forTo(printContents, function (j) {
|
9484
|
+
var rowItem = printContents[j];
|
9485
|
+
return Promise.resolve(html2canvas(rowItem)).then(function (rowItemCanvas) {
|
9486
|
+
function _temp10() {
|
9487
|
+
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
9488
|
+
line += height;
|
9489
|
+
}
|
9490
|
+
var height = rowItemCanvas.height * chartWidth / rowItemCanvas.width;
|
9491
|
+
var data = rowItemCanvas.toDataURL('image/png');
|
9492
|
+
var _temp9 = function () {
|
9493
|
+
if (line + height > HEIGHT_PAPER) {
|
9494
|
+
breakPage();
|
9495
|
+
return Promise.resolve(printHeader()).then(function () {});
|
9496
|
+
}
|
9497
|
+
}();
|
9498
|
+
return _temp9 && _temp9.then ? _temp9.then(_temp10) : _temp10(_temp9);
|
9499
|
+
});
|
9500
|
+
});
|
9501
|
+
if (_temp11 && _temp11.then) return _temp11.then(function () {});
|
9502
|
+
});
|
9503
|
+
}
|
9504
|
+
var printContainerEl = printContainerEls[i];
|
9505
|
+
var printHeaderEl = printContainerEl.querySelector("." + PrintHeaderClassName);
|
9506
|
+
var printHeaderCanvas = null;
|
9507
|
+
var _temp12 = function () {
|
9508
|
+
if (printHeaderEl) {
|
9509
|
+
return Promise.resolve(html2canvas(printHeaderEl)).then(function (_html2canvas) {
|
9510
|
+
printHeaderCanvas = _html2canvas;
|
9511
|
+
});
|
9512
|
+
}
|
9513
|
+
}();
|
9514
|
+
return _temp12 && _temp12.then ? _temp12.then(_temp13) : _temp13(_temp12);
|
9515
|
+
});
|
9516
|
+
if (_temp14 && _temp14.then) return _temp14.then(function () {});
|
9517
|
+
} else {
|
9518
|
+
return Promise.resolve(html2canvas(chart)).then(function (chartCanvas) {
|
9519
|
+
var imgBodyHeight = chartCanvas.height * chartWidth / chartCanvas.width;
|
9520
|
+
var imgBodyData = chartCanvas.toDataURL('image/png');
|
9521
|
+
line += 10;
|
9522
|
+
if (line + imgBodyHeight > HEIGHT_PAPER) breakPage();
|
9523
|
+
doc.addImage(imgBodyData, 'PNG', 10, line, chartWidth, imgBodyHeight);
|
9524
|
+
line += imgBodyHeight;
|
9525
|
+
});
|
9526
|
+
}
|
9527
|
+
}();
|
9528
|
+
return _temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15);
|
9529
|
+
}
|
9530
|
+
var chart = canvas.children.item(_index);
|
9531
|
+
if (chart.getAttribute("id") === "header-canvas") return;
|
9532
|
+
var chartTitle = chart.querySelector(".chart-title");
|
9533
|
+
var printContainerEls = chart.querySelectorAll("." + PrintContainerClassName);
|
9534
|
+
var _temp17 = function () {
|
9535
|
+
if (chartTitle && printContainerEls.length) {
|
9536
|
+
return Promise.resolve(html2canvas(chartTitle)).then(function (printChartTitleCanvas) {
|
9537
|
+
var height = printChartTitleCanvas.height * chartWidth / printChartTitleCanvas.width;
|
9538
|
+
var data = printChartTitleCanvas.toDataURL('image/png');
|
9539
|
+
if (line + height + 10 > HEIGHT_PAPER) breakPage();else line + 10;
|
9540
|
+
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
9541
|
+
line += height;
|
9542
|
+
});
|
9543
|
+
}
|
9544
|
+
}();
|
9545
|
+
return _temp17 && _temp17.then ? _temp17.then(_temp18) : _temp18(_temp17);
|
9546
|
+
});
|
9547
|
+
if (_temp19 && _temp19.then) return _temp19.then(function () {});
|
9548
|
+
}
|
9549
|
+
}();
|
9550
|
+
return _temp20 && _temp20.then ? _temp20.then(_temp21) : _temp21(_temp20);
|
9551
|
+
});
|
9552
|
+
}, function (error) {
|
9553
|
+
console.log({
|
9554
|
+
error: error
|
9252
9555
|
});
|
9556
|
+
toast.error("Print pdf failure!");
|
9253
9557
|
});
|
9558
|
+
return Promise.resolve(_temp22 && _temp22.then ? _temp22.then(_temp23) : _temp23(_temp22));
|
9254
9559
|
} catch (e) {
|
9255
9560
|
return Promise.reject(e);
|
9256
9561
|
}
|
@@ -10753,7 +11058,8 @@ function CreateNewQuestionDialog(_ref) {
|
|
10753
11058
|
function MyAnswer(_ref) {
|
10754
11059
|
var data = _ref.data,
|
10755
11060
|
categories = _ref.categories,
|
10756
|
-
isStudent = _ref.isStudent
|
11061
|
+
isStudent = _ref.isStudent,
|
11062
|
+
isPrint = _ref.isPrint;
|
10757
11063
|
var _useCreateQuestionDia = useCreateQuestionDialog(),
|
10758
11064
|
handleCreateQuestion = _useCreateQuestionDia.handleCreateQuestion,
|
10759
11065
|
openCreateQuestionDialog = _useCreateQuestionDia.openCreateQuestionDialog,
|
@@ -10770,94 +11076,8 @@ function MyAnswer(_ref) {
|
|
10770
11076
|
handleSelectQuestionOrder(id);
|
10771
11077
|
toggleCreateQuestion();
|
10772
11078
|
};
|
10773
|
-
|
10774
|
-
|
10775
|
-
}, formattedData && formattedData.length > 0 && formattedData.map(function (item) {
|
10776
|
-
return React.createElement("div", {
|
10777
|
-
key: item.category.id
|
10778
|
-
}, React.createElement(Stack, {
|
10779
|
-
bgcolor: "#F9FAFB",
|
10780
|
-
flexDirection: "row",
|
10781
|
-
padding: "12px",
|
10782
|
-
className: styles$4["myAnswerItem"] + " " + styles["noGutters"]
|
10783
|
-
}, React.createElement("div", {
|
10784
|
-
className: styles["custom-col-2"],
|
10785
|
-
style: {
|
10786
|
-
display: "flex",
|
10787
|
-
gap: "4px"
|
10788
|
-
}
|
10789
|
-
}, React.createElement(Typography, {
|
10790
|
-
sx: {
|
10791
|
-
fontSize: "13px",
|
10792
|
-
fontWeight: 600,
|
10793
|
-
color: "#97A1AF"
|
10794
|
-
}
|
10795
|
-
}, "\uBB38\uC81C \uBC88\uD638")), React.createElement("div", {
|
10796
|
-
className: styles["custom-col-2"],
|
10797
|
-
style: {
|
10798
|
-
display: "flex",
|
10799
|
-
gap: "4px"
|
10800
|
-
}
|
10801
|
-
}, React.createElement(Typography, {
|
10802
|
-
sx: {
|
10803
|
-
fontSize: "13px",
|
10804
|
-
fontWeight: 600,
|
10805
|
-
color: "#97A1AF"
|
10806
|
-
}
|
10807
|
-
}, "\uC815\uB2F5")), React.createElement("div", {
|
10808
|
-
className: styles["custom-col-2"],
|
10809
|
-
style: {
|
10810
|
-
display: "flex",
|
10811
|
-
gap: "4px"
|
10812
|
-
}
|
10813
|
-
}, React.createElement(Typography, {
|
10814
|
-
sx: {
|
10815
|
-
fontSize: "13px",
|
10816
|
-
fontWeight: 600,
|
10817
|
-
color: "#97A1AF"
|
10818
|
-
}
|
10819
|
-
}, "\uD480\uC774 \uC2DC\uAC04")), React.createElement("div", {
|
10820
|
-
className: styles["custom-col-2"],
|
10821
|
-
style: {
|
10822
|
-
display: "flex",
|
10823
|
-
alignItems: "center",
|
10824
|
-
gap: "4px"
|
10825
|
-
}
|
10826
|
-
}, React.createElement(Typography, {
|
10827
|
-
sx: {
|
10828
|
-
fontSize: "13px",
|
10829
|
-
fontWeight: 600,
|
10830
|
-
color: "#97A1AF"
|
10831
|
-
}
|
10832
|
-
}, "\uC0C1\uC704\uAD8C \uBE44\uAD50")), React.createElement("div", {
|
10833
|
-
className: styles["custom-col-2"],
|
10834
|
-
style: {
|
10835
|
-
display: "flex",
|
10836
|
-
alignItems: "center",
|
10837
|
-
gap: "4px"
|
10838
|
-
}
|
10839
|
-
}, React.createElement(Typography, {
|
10840
|
-
sx: {
|
10841
|
-
fontSize: "13px",
|
10842
|
-
fontWeight: 600,
|
10843
|
-
color: "#97A1AF"
|
10844
|
-
}
|
10845
|
-
}, "\uC804\uCCB4 \uC815\uB2F5\uB960"))), React.createElement("div", {
|
10846
|
-
className: styles$4["titleMyAnswer2"]
|
10847
|
-
}, React.createElement(Typography, {
|
10848
|
-
sx: {
|
10849
|
-
color: "#97A1AF",
|
10850
|
-
fontSize: "12px"
|
10851
|
-
}
|
10852
|
-
}, "\uCE74\uD14C\uACE0\uB9AC"), React.createElement(Typography, {
|
10853
|
-
sx: {
|
10854
|
-
color: "#414E62",
|
10855
|
-
fontSize: "12px",
|
10856
|
-
fontWeight: 700
|
10857
|
-
}
|
10858
|
-
}, item.category.name)), React.createElement("div", {
|
10859
|
-
className: styles$4["contentMyAnswer"]
|
10860
|
-
}, item.questions.map(function (question, index) {
|
11079
|
+
var renderQuestions = function renderQuestions(questions) {
|
11080
|
+
return questions.map(function (question, index) {
|
10861
11081
|
return React.createElement("div", {
|
10862
11082
|
style: isOpenTime[question.id] ? {
|
10863
11083
|
borderTop: index !== 0 ? "1px solid #E4E7EC" : "",
|
@@ -10952,7 +11172,108 @@ function MyAnswer(_ref) {
|
|
10952
11172
|
}, React.createElement(iconChat, {
|
10953
11173
|
color: "#5458D5"
|
10954
11174
|
})))));
|
10955
|
-
})
|
11175
|
+
});
|
11176
|
+
};
|
11177
|
+
var renderPrintQuestions = function renderPrintQuestions(questions) {
|
11178
|
+
var chunkedQuestions = _.chunk(questions, 5);
|
11179
|
+
return chunkedQuestions.map(function (i, index) {
|
11180
|
+
return React.createElement("div", {
|
11181
|
+
key: index,
|
11182
|
+
className: PrintContentClassName
|
11183
|
+
}, renderQuestions(i));
|
11184
|
+
});
|
11185
|
+
};
|
11186
|
+
return React.createElement("div", {
|
11187
|
+
className: styles$4["myanswer"]
|
11188
|
+
}, formattedData && formattedData.length > 0 && formattedData.map(function (item) {
|
11189
|
+
return React.createElement("div", {
|
11190
|
+
key: item.category.id,
|
11191
|
+
className: isPrint ? PrintContainerClassName : ""
|
11192
|
+
}, React.createElement("div", {
|
11193
|
+
className: isPrint ? PrintHeaderClassName : ""
|
11194
|
+
}, React.createElement(Stack, {
|
11195
|
+
bgcolor: "#F9FAFB",
|
11196
|
+
flexDirection: "row",
|
11197
|
+
padding: "12px",
|
11198
|
+
className: styles$4["myAnswerItem"] + " " + styles["noGutters"]
|
11199
|
+
}, React.createElement("div", {
|
11200
|
+
className: styles["custom-col-2"],
|
11201
|
+
style: {
|
11202
|
+
display: "flex",
|
11203
|
+
gap: "4px"
|
11204
|
+
}
|
11205
|
+
}, React.createElement(Typography, {
|
11206
|
+
sx: {
|
11207
|
+
fontSize: "13px",
|
11208
|
+
fontWeight: 600,
|
11209
|
+
color: "#97A1AF"
|
11210
|
+
}
|
11211
|
+
}, "\uBB38\uC81C \uBC88\uD638")), React.createElement("div", {
|
11212
|
+
className: styles["custom-col-2"],
|
11213
|
+
style: {
|
11214
|
+
display: "flex",
|
11215
|
+
gap: "4px"
|
11216
|
+
}
|
11217
|
+
}, React.createElement(Typography, {
|
11218
|
+
sx: {
|
11219
|
+
fontSize: "13px",
|
11220
|
+
fontWeight: 600,
|
11221
|
+
color: "#97A1AF"
|
11222
|
+
}
|
11223
|
+
}, "\uC815\uB2F5")), React.createElement("div", {
|
11224
|
+
className: styles["custom-col-2"],
|
11225
|
+
style: {
|
11226
|
+
display: "flex",
|
11227
|
+
gap: "4px"
|
11228
|
+
}
|
11229
|
+
}, React.createElement(Typography, {
|
11230
|
+
sx: {
|
11231
|
+
fontSize: "13px",
|
11232
|
+
fontWeight: 600,
|
11233
|
+
color: "#97A1AF"
|
11234
|
+
}
|
11235
|
+
}, "\uD480\uC774 \uC2DC\uAC04")), React.createElement("div", {
|
11236
|
+
className: styles["custom-col-2"],
|
11237
|
+
style: {
|
11238
|
+
display: "flex",
|
11239
|
+
alignItems: "center",
|
11240
|
+
gap: "4px"
|
11241
|
+
}
|
11242
|
+
}, React.createElement(Typography, {
|
11243
|
+
sx: {
|
11244
|
+
fontSize: "13px",
|
11245
|
+
fontWeight: 600,
|
11246
|
+
color: "#97A1AF"
|
11247
|
+
}
|
11248
|
+
}, "\uC0C1\uC704\uAD8C \uBE44\uAD50")), React.createElement("div", {
|
11249
|
+
className: styles["custom-col-2"],
|
11250
|
+
style: {
|
11251
|
+
display: "flex",
|
11252
|
+
alignItems: "center",
|
11253
|
+
gap: "4px"
|
11254
|
+
}
|
11255
|
+
}, React.createElement(Typography, {
|
11256
|
+
sx: {
|
11257
|
+
fontSize: "13px",
|
11258
|
+
fontWeight: 600,
|
11259
|
+
color: "#97A1AF"
|
11260
|
+
}
|
11261
|
+
}, "\uC804\uCCB4 \uC815\uB2F5\uB960"))), React.createElement("div", {
|
11262
|
+
className: styles$4["titleMyAnswer2"]
|
11263
|
+
}, React.createElement(Typography, {
|
11264
|
+
sx: {
|
11265
|
+
color: "#97A1AF",
|
11266
|
+
fontSize: "12px"
|
11267
|
+
}
|
11268
|
+
}, "\uCE74\uD14C\uACE0\uB9AC"), React.createElement(Typography, {
|
11269
|
+
sx: {
|
11270
|
+
color: "#414E62",
|
11271
|
+
fontSize: "12px",
|
11272
|
+
fontWeight: 700
|
11273
|
+
}
|
11274
|
+
}, item.category.name))), React.createElement("div", {
|
11275
|
+
className: styles$4["contentMyAnswer"]
|
11276
|
+
}, isPrint ? renderPrintQuestions(item.questions) : renderQuestions(item.questions)));
|
10956
11277
|
}), React.createElement(CreateNewQuestionDialog, {
|
10957
11278
|
questions: data === null || data === void 0 ? void 0 : data.questions,
|
10958
11279
|
questionOrderSelected: questionOrderSelected,
|
@@ -11005,10 +11326,74 @@ var iconBtnNextChart = function iconBtnNextChart(_ref) {
|
|
11005
11326
|
}));
|
11006
11327
|
};
|
11007
11328
|
|
11008
|
-
function CompareGrass(_ref) {
|
11009
|
-
var effectSize = _ref.effectSize
|
11329
|
+
var CompareGrass = function CompareGrass(_ref) {
|
11330
|
+
var effectSize = _ref.effectSize,
|
11331
|
+
isPrint = _ref.isPrint;
|
11332
|
+
var renderTableBody = function renderTableBody(effectSize) {
|
11333
|
+
return effectSize.map(function (item, index) {
|
11334
|
+
return React.createElement("tr", {
|
11335
|
+
id: "print-item",
|
11336
|
+
key: item.id,
|
11337
|
+
style: index < effectSize.length - 1 ? {
|
11338
|
+
borderBottom: "1px solid #e4e7ec"
|
11339
|
+
} : {}
|
11340
|
+
}, React.createElement("td", {
|
11341
|
+
className: styles$4["tdcolumn1"]
|
11342
|
+
}, "\uBB38\uC81C ", item.questionOrder + 1), React.createElement("td", {
|
11343
|
+
style: {
|
11344
|
+
textAlign: "center",
|
11345
|
+
color: "#202B37"
|
11346
|
+
}
|
11347
|
+
}, item.correctAnswers, "\uBC88"), React.createElement("td", {
|
11348
|
+
className: styles$4["tdcolumn3"],
|
11349
|
+
style: {
|
11350
|
+
color: item.isCorrect ? "#1EE288" : "#F34B4B"
|
11351
|
+
}
|
11352
|
+
}, item.selectedAnswers ? item.selectedAnswers + "\uBC88" : ""), React.createElement("td", {
|
11353
|
+
style: {
|
11354
|
+
textAlign: "center",
|
11355
|
+
color: "#414E62"
|
11356
|
+
}
|
11357
|
+
}, item.mostSelectedAnswers ? item.mostSelectedAnswers + "\uBC88" : ""), React.createElement("td", null, React.createElement("div", {
|
11358
|
+
className: styles$4["classification"]
|
11359
|
+
}, item.problemCategories.map(function (problem, index) {
|
11360
|
+
return React.createElement("div", {
|
11361
|
+
key: index
|
11362
|
+
}, problem === 1 && React.createElement("span", {
|
11363
|
+
style: {
|
11364
|
+
border: "1px solid #1EE288"
|
11365
|
+
}
|
11366
|
+
}, "\uC26C\uC6B4 \uBB38\uC81C"), problem === 3 && React.createElement("span", {
|
11367
|
+
style: {
|
11368
|
+
border: "1px solid #FDDB64"
|
11369
|
+
}
|
11370
|
+
}, "\uD568\uC815 \uBB38\uC81C"), problem === 2 && React.createElement("span", {
|
11371
|
+
style: {
|
11372
|
+
border: "1px solid #F34B4B"
|
11373
|
+
}
|
11374
|
+
}, "\uBCC0\uBCC4\uB825 \uBB38\uC81C"), problem === 0 && React.createElement("span", {
|
11375
|
+
style: {
|
11376
|
+
border: "1px solid #DDDDDD"
|
11377
|
+
}
|
11378
|
+
}, "\uC77C\uBC18\uC801\uC778 \uBB38\uC81C"), problem === 4 && React.createElement("span", {
|
11379
|
+
style: {
|
11380
|
+
border: "1px solid #FF0000"
|
11381
|
+
}
|
11382
|
+
}, "\uC5B4\uB824\uC6B4 \uBB38\uC81C"));
|
11383
|
+
}))));
|
11384
|
+
});
|
11385
|
+
};
|
11386
|
+
var renderPrintTableBody = function renderPrintTableBody(effectSize) {
|
11387
|
+
var chunkedEffectSizeQuestions = _.chunk(effectSize, 5);
|
11388
|
+
return chunkedEffectSizeQuestions.map(function (i, index) {
|
11389
|
+
return React.createElement("tbody", {
|
11390
|
+
key: index,
|
11391
|
+
className: PrintContentClassName
|
11392
|
+
}, renderTableBody(i));
|
11393
|
+
});
|
11394
|
+
};
|
11010
11395
|
return React.createElement("div", {
|
11011
|
-
className: styles$4["compareGrass"]
|
11396
|
+
className: styles$4["compareGrass"] + " " + (isPrint ? PrintContainerClassName : "")
|
11012
11397
|
}, React.createElement("div", {
|
11013
11398
|
className: styles$4["tableCompareGrass"]
|
11014
11399
|
}, React.createElement("div", {
|
@@ -11020,7 +11405,8 @@ function CompareGrass(_ref) {
|
|
11020
11405
|
}, React.createElement("thead", {
|
11021
11406
|
style: {
|
11022
11407
|
borderBottom: "1px solid #E4E7EC"
|
11023
|
-
}
|
11408
|
+
},
|
11409
|
+
className: isPrint ? PrintHeaderClassName : ""
|
11024
11410
|
}, React.createElement("tr", null, React.createElement("th", {
|
11025
11411
|
className: styles$4["thcolumn1"]
|
11026
11412
|
}, "\uBB38\uC81C \uBC88\uD638"), React.createElement("th", {
|
@@ -11039,58 +11425,8 @@ function CompareGrass(_ref) {
|
|
11039
11425
|
style: {
|
11040
11426
|
textAlign: "center"
|
11041
11427
|
}
|
11042
|
-
}, "\uBB38\uC81C \uBD84\uB958"))), React.createElement("tbody", null, effectSize
|
11043
|
-
|
11044
|
-
key: item.id,
|
11045
|
-
style: index < effectSize.length - 1 ? {
|
11046
|
-
borderBottom: "1px solid #e4e7ec"
|
11047
|
-
} : {}
|
11048
|
-
}, React.createElement("td", {
|
11049
|
-
className: styles$4["tdcolumn1"]
|
11050
|
-
}, "\uBB38\uC81C ", item.questionOrder + 1), React.createElement("td", {
|
11051
|
-
style: {
|
11052
|
-
textAlign: "center",
|
11053
|
-
color: "#202B37"
|
11054
|
-
}
|
11055
|
-
}, item.correctAnswers, "\uBC88"), React.createElement("td", {
|
11056
|
-
className: styles$4["tdcolumn3"],
|
11057
|
-
style: {
|
11058
|
-
color: item.isCorrect ? "#1EE288" : "#F34B4B"
|
11059
|
-
}
|
11060
|
-
}, item.selectedAnswers ? item.selectedAnswers + "\uBC88" : ""), React.createElement("td", {
|
11061
|
-
style: {
|
11062
|
-
textAlign: "center",
|
11063
|
-
color: "#414E62"
|
11064
|
-
}
|
11065
|
-
}, item.mostSelectedAnswers ? item.mostSelectedAnswers + "\uBC88" : ""), React.createElement("td", null, React.createElement("div", {
|
11066
|
-
className: styles$4["classification"]
|
11067
|
-
}, item.problemCategories.map(function (problem, index) {
|
11068
|
-
return React.createElement("div", {
|
11069
|
-
key: index
|
11070
|
-
}, problem === 1 && React.createElement("span", {
|
11071
|
-
style: {
|
11072
|
-
border: "1px solid #1EE288"
|
11073
|
-
}
|
11074
|
-
}, "\uC26C\uC6B4 \uBB38\uC81C"), problem === 3 && React.createElement("span", {
|
11075
|
-
style: {
|
11076
|
-
border: "1px solid #FDDB64"
|
11077
|
-
}
|
11078
|
-
}, "\uD568\uC815 \uBB38\uC81C"), problem === 2 && React.createElement("span", {
|
11079
|
-
style: {
|
11080
|
-
border: "1px solid #F34B4B"
|
11081
|
-
}
|
11082
|
-
}, "\uBCC0\uBCC4\uB825 \uBB38\uC81C"), problem === 0 && React.createElement("span", {
|
11083
|
-
style: {
|
11084
|
-
border: "1px solid #DDDDDD"
|
11085
|
-
}
|
11086
|
-
}, "\uC77C\uBC18\uC801\uC778 \uBB38\uC81C"), problem === 4 && React.createElement("span", {
|
11087
|
-
style: {
|
11088
|
-
border: "1px solid #FF0000"
|
11089
|
-
}
|
11090
|
-
}, "\uC5B4\uB824\uC6B4 \uBB38\uC81C"));
|
11091
|
-
}))));
|
11092
|
-
}))))));
|
11093
|
-
}
|
11428
|
+
}, "\uBB38\uC81C \uBD84\uB958"))), isPrint ? renderPrintTableBody(effectSize) : React.createElement("tbody", null, renderTableBody(effectSize))))));
|
11429
|
+
};
|
11094
11430
|
|
11095
11431
|
var iconUpArrow = function iconUpArrow(_ref) {
|
11096
11432
|
var _ref$width = _ref.width,
|
@@ -11179,20 +11515,75 @@ var iconAssignedQuestions = function iconAssignedQuestions(_ref) {
|
|
11179
11515
|
}));
|
11180
11516
|
};
|
11181
11517
|
|
11182
|
-
function TrickyProblem(_ref) {
|
11518
|
+
var TrickyProblem = function TrickyProblem(_ref) {
|
11183
11519
|
var data = _ref.data,
|
11184
11520
|
openProblem = _ref.openProblem,
|
11185
|
-
changeOpen = _ref.changeOpen
|
11521
|
+
changeOpen = _ref.changeOpen,
|
11522
|
+
isPrint = _ref.isPrint;
|
11186
11523
|
var inCorrectQuestions = data.questions.filter(function (i) {
|
11187
11524
|
return i.isStar && !i.isCorrect;
|
11188
11525
|
});
|
11189
11526
|
var correctQuestions = data.questions.filter(function (i) {
|
11190
11527
|
return i.isStar && i.isCorrect;
|
11191
11528
|
});
|
11529
|
+
var renderProblems = function renderProblems() {
|
11530
|
+
return React.createElement(Fragment$1, null, React.createElement("div", {
|
11531
|
+
className: styles$4["titleTrickyProblem"]
|
11532
|
+
}, React.createElement(iconX, null), React.createElement("span", null, "\uBCC4\uD45C \uCE5C \uBB38\uC81C \uC911 \uD2C0\uB9B0 \uBB38\uC81C")), React.createElement("div", {
|
11533
|
+
className: styles$4["wrongQuestions"]
|
11534
|
+
}, !!inCorrectQuestions.length && inCorrectQuestions.map(function (question) {
|
11535
|
+
return React.createElement("span", {
|
11536
|
+
key: question.id,
|
11537
|
+
className: styles$4["question"]
|
11538
|
+
}, question.questionOrder + 1, "\uBC88");
|
11539
|
+
}), !data.questions.length && React.createElement("div", {
|
11540
|
+
className: styles$4["noData"]
|
11541
|
+
}, "\uB370\uC774\uD130 \uC5C6\uC74C")), React.createElement("div", {
|
11542
|
+
className: styles$4["titleTrickyProblem"]
|
11543
|
+
}, React.createElement(iconAssignedQuestions, null), React.createElement("span", null, "\uBCC4\uD45C \uCE5C \uBB38\uC81C \uC911 \uB9DE\uCD98 \uBB38\uC81C")), React.createElement("div", {
|
11544
|
+
className: styles$4["assignedQuestions"]
|
11545
|
+
}, !!correctQuestions.length && correctQuestions.map(function (question) {
|
11546
|
+
return React.createElement("div", {
|
11547
|
+
key: question.id,
|
11548
|
+
className: styles$4["question"]
|
11549
|
+
}, question.questionOrder + 1, "\uBC88");
|
11550
|
+
}), !data.questions.length && React.createElement("div", {
|
11551
|
+
className: styles$4["noData"]
|
11552
|
+
}, "\uB370\uC774\uD130 \uC5C6\uC74C")));
|
11553
|
+
};
|
11554
|
+
var renderPrintProblems = function renderPrintProblems() {
|
11555
|
+
return React.createElement(Fragment$1, null, React.createElement("div", {
|
11556
|
+
className: PrintContentClassName
|
11557
|
+
}, React.createElement("div", {
|
11558
|
+
className: styles$4["titleTrickyProblem"]
|
11559
|
+
}, React.createElement(iconX, null), React.createElement("span", null, "\uBCC4\uD45C \uCE5C \uBB38\uC81C \uC911 \uD2C0\uB9B0 \uBB38\uC81C")), React.createElement("div", {
|
11560
|
+
className: styles$4["wrongQuestions"]
|
11561
|
+
}, !!inCorrectQuestions.length && inCorrectQuestions.map(function (question) {
|
11562
|
+
return React.createElement("span", {
|
11563
|
+
key: question.id,
|
11564
|
+
className: styles$4["question"]
|
11565
|
+
}, question.questionOrder + 1, "\uBC88");
|
11566
|
+
}), !data.questions.length && React.createElement("div", {
|
11567
|
+
className: styles$4["noData"]
|
11568
|
+
}, "\uB370\uC774\uD130 \uC5C6\uC74C"))), React.createElement("div", {
|
11569
|
+
className: PrintContentClassName
|
11570
|
+
}, React.createElement("div", {
|
11571
|
+
className: styles$4["titleTrickyProblem"]
|
11572
|
+
}, React.createElement(iconAssignedQuestions, null), React.createElement("span", null, "\uBCC4\uD45C \uCE5C \uBB38\uC81C \uC911 \uB9DE\uCD98 \uBB38\uC81C")), React.createElement("div", {
|
11573
|
+
className: styles$4["assignedQuestions"]
|
11574
|
+
}, !!correctQuestions.length && correctQuestions.map(function (question) {
|
11575
|
+
return React.createElement("div", {
|
11576
|
+
key: question.id,
|
11577
|
+
className: styles$4["question"]
|
11578
|
+
}, question.questionOrder + 1, "\uBC88");
|
11579
|
+
}), !data.questions.length && React.createElement("div", {
|
11580
|
+
className: styles$4["noData"]
|
11581
|
+
}, "\uB370\uC774\uD130 \uC5C6\uC74C"))));
|
11582
|
+
};
|
11192
11583
|
return React.createElement("div", {
|
11193
|
-
className: styles$4["wrapperProblem"]
|
11584
|
+
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
11194
11585
|
}, React.createElement("div", {
|
11195
|
-
className: !openProblem.problem1 ? styles$4["titleProblemClose"] : styles$4["titleProblem"],
|
11586
|
+
className: (!openProblem.problem1 ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintHeaderClassName : ""),
|
11196
11587
|
onClick: function onClick() {
|
11197
11588
|
return changeOpen(_extends({}, openProblem, {
|
11198
11589
|
problem1: !openProblem.problem1
|
@@ -11204,41 +11595,53 @@ function TrickyProblem(_ref) {
|
|
11204
11595
|
fontSize: "14px",
|
11205
11596
|
fontWeight: 700
|
11206
11597
|
}
|
11207
|
-
}, "\uAE4C\uB2E4\uB85C\uC6E0\uB358 \uBB38\uC81C"), openProblem.problem1 ? React.createElement(iconUpArrow, null) : React.createElement(iconDownArrow, null)), openProblem.problem1 && React.createElement(Fragment$1, null,
|
11208
|
-
|
11209
|
-
}, React.createElement(iconX, null), React.createElement("span", null, "\uBCC4\uD45C \uCE5C \uBB38\uC81C \uC911 \uD2C0\uB9B0 \uBB38\uC81C")), React.createElement("div", {
|
11210
|
-
className: styles$4["wrongQuestions"]
|
11211
|
-
}, !!inCorrectQuestions.length && inCorrectQuestions.map(function (question) {
|
11212
|
-
return React.createElement("span", {
|
11213
|
-
key: question.id,
|
11214
|
-
className: styles$4["question"]
|
11215
|
-
}, question.questionOrder + 1, "\uBC88");
|
11216
|
-
}), !data.questions.length && React.createElement("div", {
|
11217
|
-
className: styles$4["noData"]
|
11218
|
-
}, "\uB370\uC774\uD130 \uC5C6\uC74C")), React.createElement("div", {
|
11219
|
-
className: styles$4["titleTrickyProblem"]
|
11220
|
-
}, React.createElement(iconAssignedQuestions, null), React.createElement("span", null, "\uBCC4\uD45C \uCE5C \uBB38\uC81C \uC911 \uB9DE\uCD98 \uBB38\uC81C")), React.createElement("div", {
|
11221
|
-
className: styles$4["assignedQuestions"]
|
11222
|
-
}, !!correctQuestions.length && correctQuestions.map(function (question) {
|
11223
|
-
return React.createElement("div", {
|
11224
|
-
key: question.id,
|
11225
|
-
className: styles$4["question"]
|
11226
|
-
}, question.questionOrder + 1, "\uBC88");
|
11227
|
-
}), !data.questions.length && React.createElement("div", {
|
11228
|
-
className: styles$4["noData"]
|
11229
|
-
}, "\uB370\uC774\uD130 \uC5C6\uC74C"))));
|
11230
|
-
}
|
11598
|
+
}, "\uAE4C\uB2E4\uB85C\uC6E0\uB358 \uBB38\uC81C"), openProblem.problem1 ? React.createElement(iconUpArrow, null) : React.createElement(iconDownArrow, null)), openProblem.problem1 && React.createElement(Fragment$1, null, isPrint ? renderPrintProblems() : renderProblems()));
|
11599
|
+
};
|
11231
11600
|
|
11232
|
-
function ProtractedProblem(_ref) {
|
11601
|
+
var ProtractedProblem = function ProtractedProblem(_ref) {
|
11233
11602
|
var data = _ref.data,
|
11234
11603
|
openProblem = _ref.openProblem,
|
11235
|
-
changeOpen = _ref.changeOpen
|
11604
|
+
changeOpen = _ref.changeOpen,
|
11605
|
+
isPrint = _ref.isPrint;
|
11236
11606
|
var _useTranslation = useTranslation(),
|
11237
11607
|
t = _useTranslation.t;
|
11608
|
+
var renderQuestions = function renderQuestions(data) {
|
11609
|
+
return data.map(function (item) {
|
11610
|
+
return React.createElement("div", {
|
11611
|
+
className: styles$4["content"],
|
11612
|
+
key: item.id
|
11613
|
+
}, React.createElement("div", {
|
11614
|
+
className: styles$4["contentColumn1"]
|
11615
|
+
}, React.createElement("div", null, React.createElement("span", {
|
11616
|
+
className: styles$4["span1"]
|
11617
|
+
}, "\uBB38\uC81C"), React.createElement("span", {
|
11618
|
+
className: styles$4["span2"]
|
11619
|
+
}, item.questionOrder + 1, "\uBC88"))), React.createElement("div", {
|
11620
|
+
className: styles$4["contentColumn2"]
|
11621
|
+
}, React.createElement("div", null, React.createElement("span", {
|
11622
|
+
className: styles$4["span1"]
|
11623
|
+
}, "\uB098\uC758 \uC2DC\uAC04"), React.createElement("span", {
|
11624
|
+
className: styles$4["span2"]
|
11625
|
+
}, "\uC0C1\uC704\uAD8C \uC2DC\uAC04")), React.createElement("div", null, React.createElement("span", {
|
11626
|
+
className: styles$4["duration"]
|
11627
|
+
}, formatTimeSecond(item.duration, t)), React.createElement("span", {
|
11628
|
+
className: styles$4["topDuration"]
|
11629
|
+
}, formatTimeSecond(item.topDuration, t)))));
|
11630
|
+
});
|
11631
|
+
};
|
11632
|
+
var renderPrintQuestions = function renderPrintQuestions() {
|
11633
|
+
var chunkedData = _.chunk(data, 5);
|
11634
|
+
return chunkedData.map(function (i, index) {
|
11635
|
+
return React.createElement("div", {
|
11636
|
+
key: index,
|
11637
|
+
className: PrintContentClassName
|
11638
|
+
}, renderQuestions(i));
|
11639
|
+
});
|
11640
|
+
};
|
11238
11641
|
return React.createElement("div", {
|
11239
|
-
className: styles$4["wrapperProblem"]
|
11642
|
+
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
11240
11643
|
}, React.createElement("div", {
|
11241
|
-
className: !openProblem.problem2 ? styles$4["titleProblemClose"] : styles$4["titleProblem"],
|
11644
|
+
className: (!openProblem.problem2 ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintHeaderClassName : ""),
|
11242
11645
|
onClick: function onClick() {
|
11243
11646
|
return changeOpen(_extends({}, openProblem, {
|
11244
11647
|
problem2: !openProblem.problem2
|
@@ -11252,45 +11655,58 @@ function ProtractedProblem(_ref) {
|
|
11252
11655
|
}
|
11253
11656
|
}, "\uC2DC\uAC04\uC774 \uC624\uB798 \uAC78\uB9B0 \uBB38\uC81C"), openProblem.problem2 ? React.createElement(iconUpArrow, null) : React.createElement(iconDownArrow, null)), openProblem.problem2 && React.createElement(Fragment$1, null, React.createElement("div", {
|
11254
11657
|
className: styles$4["wrapperContent"]
|
11255
|
-
}, data.length ?
|
11256
|
-
|
11257
|
-
className: styles$4["content"],
|
11258
|
-
key: item.id
|
11259
|
-
}, React.createElement("div", {
|
11260
|
-
className: styles$4["contentColumn1"]
|
11261
|
-
}, React.createElement("div", null, React.createElement("span", {
|
11262
|
-
className: styles$4["span1"]
|
11263
|
-
}, "\uBB38\uC81C"), React.createElement("span", {
|
11264
|
-
className: styles$4["span2"]
|
11265
|
-
}, item.questionOrder + 1, "\uBC88"))), React.createElement("div", {
|
11266
|
-
className: styles$4["contentColumn2"]
|
11267
|
-
}, React.createElement("div", null, React.createElement("span", {
|
11268
|
-
className: styles$4["span1"]
|
11269
|
-
}, "\uB098\uC758 \uC2DC\uAC04"), React.createElement("span", {
|
11270
|
-
className: styles$4["span2"]
|
11271
|
-
}, "\uC0C1\uC704\uAD8C \uC2DC\uAC04")), React.createElement("div", null, React.createElement("span", {
|
11272
|
-
className: styles$4["duration"]
|
11273
|
-
}, formatTimeSecond(item.duration, t)), React.createElement("span", {
|
11274
|
-
className: styles$4["topDuration"]
|
11275
|
-
}, formatTimeSecond(item.topDuration, t)))));
|
11276
|
-
}) : React.createElement("div", {
|
11277
|
-
className: styles$4["noData"]
|
11658
|
+
}, data.length ? isPrint ? renderPrintQuestions() : renderQuestions(data) : React.createElement("div", {
|
11659
|
+
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
11278
11660
|
}, "\uB370\uC774\uD130 \uC5C6\uC74C"))));
|
11279
|
-
}
|
11661
|
+
};
|
11280
11662
|
|
11281
|
-
function Vulnerable(_ref) {
|
11663
|
+
var Vulnerable = function Vulnerable(_ref) {
|
11282
11664
|
var data = _ref.data,
|
11283
11665
|
openProblem = _ref.openProblem,
|
11284
|
-
changeOpen = _ref.changeOpen
|
11666
|
+
changeOpen = _ref.changeOpen,
|
11667
|
+
isPrint = _ref.isPrint;
|
11285
11668
|
var incorrectQuestions = data.questions.filter(function (i) {
|
11286
11669
|
return i.selectedAnswers !== "" && i.isCorrect === false;
|
11287
11670
|
}).sort(function (q1, q2) {
|
11288
11671
|
return q2.overallCorrectRate === q1.overallCorrectRate ? q1.questionOrder - q2.questionOrder : q2.overallCorrectRate - q1.overallCorrectRate;
|
11289
11672
|
});
|
11673
|
+
var renderQuestions = function renderQuestions(questions) {
|
11674
|
+
return questions.map(function (question) {
|
11675
|
+
return React.createElement("div", {
|
11676
|
+
className: styles$4["content"],
|
11677
|
+
key: question.id
|
11678
|
+
}, React.createElement("div", {
|
11679
|
+
className: styles$4["contentColumn1"]
|
11680
|
+
}, React.createElement("div", null, React.createElement("span", {
|
11681
|
+
className: styles$4["span1"]
|
11682
|
+
}, "\uBB38\uC81C"), React.createElement("span", {
|
11683
|
+
className: styles$4["span2"]
|
11684
|
+
}, question.questionOrder + 1, "\uBC88"))), React.createElement("div", {
|
11685
|
+
className: styles$4["contentColumn2"]
|
11686
|
+
}, React.createElement("div", null, React.createElement("span", {
|
11687
|
+
className: styles$4["span1"]
|
11688
|
+
}, "\uC804\uCCB4 \uC815\uB2F5\uB960"), React.createElement("span", {
|
11689
|
+
className: styles$4["span2"]
|
11690
|
+
}, "\uB098\uC758 \uC624\uB2F5")), React.createElement("div", null, React.createElement("span", {
|
11691
|
+
className: styles$4["overallCorrectRate"]
|
11692
|
+
}, question.overallCorrectRate.toFixed(2), "%"), React.createElement("span", {
|
11693
|
+
className: styles$4["answer"]
|
11694
|
+
}, question.selectedAnswers, "\uBC88 (\uC815\uB2F5", " ", question.correctAnswers, "\uBC88)"))));
|
11695
|
+
});
|
11696
|
+
};
|
11697
|
+
var renderPrintQuestions = function renderPrintQuestions(questions) {
|
11698
|
+
var chunkedQuestions = _.chunk(questions, 5);
|
11699
|
+
return chunkedQuestions.map(function (i, index) {
|
11700
|
+
return React.createElement("div", {
|
11701
|
+
key: index,
|
11702
|
+
className: PrintContentClassName
|
11703
|
+
}, renderQuestions(i));
|
11704
|
+
});
|
11705
|
+
};
|
11290
11706
|
return React.createElement("div", {
|
11291
|
-
className: styles$4["wrapperProblem"]
|
11707
|
+
className: styles$4["wrapperProblem"] + " " + PrintContainerClassName
|
11292
11708
|
}, React.createElement("div", {
|
11293
|
-
className: !openProblem.problem3 ? styles$4["titleProblemClose"] : styles$4["titleProblem"],
|
11709
|
+
className: (!openProblem.problem3 ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintHeaderClassName : ""),
|
11294
11710
|
onClick: function onClick() {
|
11295
11711
|
return changeOpen(_extends({}, openProblem, {
|
11296
11712
|
problem3: !openProblem.problem3
|
@@ -11304,40 +11720,51 @@ function Vulnerable(_ref) {
|
|
11304
11720
|
}
|
11305
11721
|
}, "\uB0B4\uAC00 \uCDE8\uC57D\uD55C \uBB38\uC81C"), openProblem.problem3 ? React.createElement(iconUpArrow, null) : React.createElement(iconDownArrow, null)), openProblem.problem3 && React.createElement(Fragment$1, null, React.createElement("div", {
|
11306
11722
|
className: styles$4["wrapperContent"]
|
11307
|
-
},
|
11308
|
-
|
11309
|
-
className: styles$4["content"],
|
11310
|
-
key: question.id
|
11311
|
-
}, React.createElement("div", {
|
11312
|
-
className: styles$4["contentColumn1"]
|
11313
|
-
}, React.createElement("div", null, React.createElement("span", {
|
11314
|
-
className: styles$4["span1"]
|
11315
|
-
}, "\uBB38\uC81C"), React.createElement("span", {
|
11316
|
-
className: styles$4["span2"]
|
11317
|
-
}, question.questionOrder + 1, "\uBC88"))), React.createElement("div", {
|
11318
|
-
className: styles$4["contentColumn2"]
|
11319
|
-
}, React.createElement("div", null, React.createElement("span", {
|
11320
|
-
className: styles$4["span1"]
|
11321
|
-
}, "\uC804\uCCB4 \uC815\uB2F5\uB960"), React.createElement("span", {
|
11322
|
-
className: styles$4["span2"]
|
11323
|
-
}, "\uB098\uC758 \uC624\uB2F5")), React.createElement("div", null, React.createElement("span", {
|
11324
|
-
className: styles$4["overallCorrectRate"]
|
11325
|
-
}, question.overallCorrectRate.toFixed(2), "%"), React.createElement("span", {
|
11326
|
-
className: styles$4["answer"]
|
11327
|
-
}, question.selectedAnswers, "\uBC88 (\uC815\uB2F5", " ", question.correctAnswers, "\uBC88)"))));
|
11328
|
-
})) : React.createElement("div", {
|
11329
|
-
className: styles$4["noData"]
|
11723
|
+
}, isPrint ? renderPrintQuestions(incorrectQuestions) : renderQuestions(incorrectQuestions), !incorrectQuestions.length && React.createElement("div", {
|
11724
|
+
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
11330
11725
|
}, "\uB370\uC774\uD130 \uC5C6\uC74C"))));
|
11331
|
-
}
|
11726
|
+
};
|
11332
11727
|
|
11333
|
-
function GradesByTerritory(_ref) {
|
11728
|
+
var GradesByTerritory = function GradesByTerritory(_ref) {
|
11334
11729
|
var data = _ref.data,
|
11335
11730
|
openProblem = _ref.openProblem,
|
11336
|
-
changeOpen = _ref.changeOpen
|
11731
|
+
changeOpen = _ref.changeOpen,
|
11732
|
+
isPrint = _ref.isPrint;
|
11733
|
+
var renderCategories = function renderCategories(data) {
|
11734
|
+
return data.map(function (item) {
|
11735
|
+
var trackStyle = {
|
11736
|
+
left: item.percentageAmongStudents + "%"
|
11737
|
+
};
|
11738
|
+
return React.createElement("div", {
|
11739
|
+
className: styles$4["contentProblem"],
|
11740
|
+
key: item.id
|
11741
|
+
}, React.createElement("div", {
|
11742
|
+
className: styles$4["labelProblem"]
|
11743
|
+
}, React.createElement("span", {
|
11744
|
+
className: styles$4["name"]
|
11745
|
+
}, item.name), React.createElement("div", {
|
11746
|
+
className: styles$4["percent"]
|
11747
|
+
}, React.createElement("span", null, item.percentageAmongStudents.toFixed(2), "%"), React.createElement("span", null, item.totalCorrectQuestions, "/", item.totalQuestions, "\uBB38\uC81C"))), React.createElement("div", {
|
11748
|
+
className: styles$4["slider"]
|
11749
|
+
}, React.createElement("div", null, React.createElement("span", {
|
11750
|
+
className: styles$4["track"],
|
11751
|
+
style: trackStyle
|
11752
|
+
}))));
|
11753
|
+
});
|
11754
|
+
};
|
11755
|
+
var renderPrintCategories = function renderPrintCategories() {
|
11756
|
+
var chunkedCategories = _.chunk(data, 5);
|
11757
|
+
return chunkedCategories.map(function (i, index) {
|
11758
|
+
return React.createElement("div", {
|
11759
|
+
key: index,
|
11760
|
+
className: PrintContentClassName
|
11761
|
+
}, renderCategories(i));
|
11762
|
+
});
|
11763
|
+
};
|
11337
11764
|
return React.createElement("div", {
|
11338
|
-
className: styles$4["wrapperProblem"]
|
11765
|
+
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
11339
11766
|
}, React.createElement("div", {
|
11340
|
-
className: !openProblem.problem4 ? styles$4["titleProblemClose"] : styles$4["titleProblem"],
|
11767
|
+
className: (!openProblem.problem4 ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintHeaderClassName : ""),
|
11341
11768
|
onClick: function onClick() {
|
11342
11769
|
return changeOpen(_extends({}, openProblem, {
|
11343
11770
|
problem4: !openProblem.problem4
|
@@ -11351,28 +11778,10 @@ function GradesByTerritory(_ref) {
|
|
11351
11778
|
}
|
11352
11779
|
}, "\uC601\uC5ED\uBCC4 \uC131\uC801"), openProblem.problem4 ? React.createElement(iconUpArrow, null) : React.createElement(iconDownArrow, null)), openProblem.problem4 && React.createElement("div", {
|
11353
11780
|
className: styles$4["wrappContentProblem"]
|
11354
|
-
}, data.
|
11355
|
-
|
11356
|
-
className: styles$4["contentProblem"],
|
11357
|
-
key: item.id
|
11358
|
-
}, React.createElement("div", {
|
11359
|
-
className: styles$4["labelProblem"]
|
11360
|
-
}, React.createElement("span", {
|
11361
|
-
className: styles$4["name"]
|
11362
|
-
}, item.name), React.createElement("div", {
|
11363
|
-
className: styles$4["percent"]
|
11364
|
-
}, React.createElement("span", null, item.percentageAmongStudents.toFixed(2), "%"), React.createElement("span", null, item.totalCorrectQuestions, "/", item.totalQuestions, "\uBB38\uC81C"))), React.createElement("div", {
|
11365
|
-
className: styles$4["slider"]
|
11366
|
-
}, React.createElement("span", {
|
11367
|
-
className: styles$4["track"],
|
11368
|
-
style: {
|
11369
|
-
left: item.percentageAmongStudents + "%"
|
11370
|
-
}
|
11371
|
-
})));
|
11372
|
-
}), openProblem.problem4 && !data.length && React.createElement("div", {
|
11373
|
-
className: styles$4["noData"]
|
11781
|
+
}, isPrint ? renderPrintCategories() : renderCategories(data), openProblem.problem4 && !data.length && React.createElement("div", {
|
11782
|
+
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
11374
11783
|
}, "\uB370\uC774\uD130 \uC5C6\uC74C")));
|
11375
|
-
}
|
11784
|
+
};
|
11376
11785
|
|
11377
11786
|
var useCreateQuestionDialog$1 = function useCreateQuestionDialog() {
|
11378
11787
|
var _useState = useState(false),
|
@@ -11601,8 +12010,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
11601
12010
|
}
|
11602
12011
|
}, React.createElement(Grid, {
|
11603
12012
|
container: true,
|
11604
|
-
padding: "24px"
|
11605
|
-
id: "header-canvas"
|
12013
|
+
padding: "24px"
|
11606
12014
|
}, React.createElement(Grid, {
|
11607
12015
|
item: true
|
11608
12016
|
}, resultDatas.courseName && React.createElement(Stack, null, React.createElement(Typography, {
|
@@ -11812,14 +12220,104 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
11812
12220
|
className: "position-absolute",
|
11813
12221
|
sx: {
|
11814
12222
|
zIndex: -1,
|
11815
|
-
width: "
|
12223
|
+
width: "1024px"
|
11816
12224
|
},
|
11817
12225
|
id: "canvas"
|
11818
|
-
}, React.createElement(
|
12226
|
+
}, React.createElement(Grid, {
|
12227
|
+
container: true,
|
12228
|
+
padding: "24px",
|
12229
|
+
id: "header-canvas"
|
12230
|
+
}, React.createElement(Grid, {
|
12231
|
+
item: true
|
12232
|
+
}, resultDatas.courseName && React.createElement(Stack, null, React.createElement(Typography, {
|
12233
|
+
sx: {
|
12234
|
+
fontSize: "14px",
|
12235
|
+
fontWeight: 600,
|
12236
|
+
color: "#C3C5FE"
|
12237
|
+
}
|
12238
|
+
}, resultDatas.courseName)), React.createElement(Box, {
|
12239
|
+
display: "flex",
|
12240
|
+
gap: "16px",
|
12241
|
+
flexDirection: "column"
|
12242
|
+
}, React.createElement(Stack, null, React.createElement(Typography, {
|
12243
|
+
sx: {
|
12244
|
+
fontSize: "20px",
|
12245
|
+
fontWeight: 600,
|
12246
|
+
color: "#5458D5"
|
12247
|
+
}
|
12248
|
+
}, resultDatas.title)), React.createElement(Stack, {
|
12249
|
+
flexDirection: "row",
|
12250
|
+
gap: "16px"
|
12251
|
+
}, React.createElement(Stack, null, React.createElement(Typography, {
|
12252
|
+
sx: {
|
12253
|
+
fontSize: "13px",
|
12254
|
+
fontWeight: 600,
|
12255
|
+
color: "#97A1AF"
|
12256
|
+
}
|
12257
|
+
}, t("my_score")), React.createElement(Typography, {
|
12258
|
+
sx: {
|
12259
|
+
fontSize: "14px",
|
12260
|
+
fontWeight: 600,
|
12261
|
+
color: "#5458D5"
|
12262
|
+
}
|
12263
|
+
}, t("score_format", {
|
12264
|
+
score: resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.score
|
12265
|
+
}))), React.createElement(Stack, null, React.createElement(Typography, {
|
12266
|
+
sx: {
|
12267
|
+
fontSize: "13px",
|
12268
|
+
fontWeight: 600,
|
12269
|
+
color: "#97A1AF"
|
12270
|
+
}
|
12271
|
+
}, t("exam_date")), React.createElement(Typography, {
|
12272
|
+
sx: {
|
12273
|
+
fontSize: "14px",
|
12274
|
+
fontWeight: 600,
|
12275
|
+
color: "#414E62"
|
12276
|
+
}
|
12277
|
+
}, utcToLocalTime(resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.startTime, t("date_format")))), React.createElement(Stack, null, React.createElement(Typography, {
|
12278
|
+
sx: {
|
12279
|
+
fontSize: "13px",
|
12280
|
+
fontWeight: 600,
|
12281
|
+
color: "#97A1AF"
|
12282
|
+
}
|
12283
|
+
}, t("exam_time")), React.createElement(Typography, {
|
12284
|
+
sx: {
|
12285
|
+
fontSize: "14px",
|
12286
|
+
fontWeight: 600,
|
12287
|
+
color: "#414E62"
|
12288
|
+
}
|
12289
|
+
}, moment(resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.startTime, "HH:mm").format("hh:mm") + " ~ " + moment(resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.finishTime, "HH:mm").format("hh:mm"))), React.createElement(Stack, null, React.createElement(Typography, {
|
12290
|
+
sx: {
|
12291
|
+
fontSize: "13px",
|
12292
|
+
fontWeight: 600,
|
12293
|
+
color: "#97A1AF"
|
12294
|
+
}
|
12295
|
+
}, t("total_students")), React.createElement(Typography, {
|
12296
|
+
sx: {
|
12297
|
+
fontSize: "14px",
|
12298
|
+
fontWeight: 600,
|
12299
|
+
color: "#414E62"
|
12300
|
+
}
|
12301
|
+
}, t("number_people", {
|
12302
|
+
number: resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.totalStudent
|
12303
|
+
}))), React.createElement(Stack, null, React.createElement(Typography, {
|
12304
|
+
sx: {
|
12305
|
+
fontSize: "13px",
|
12306
|
+
fontWeight: 600,
|
12307
|
+
color: "#97A1AF"
|
12308
|
+
}
|
12309
|
+
}, t("teacher_in_charge")), React.createElement(Typography, {
|
12310
|
+
sx: {
|
12311
|
+
fontSize: "14px",
|
12312
|
+
fontWeight: 600,
|
12313
|
+
color: "#414E62"
|
12314
|
+
}
|
12315
|
+
}, resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.teacherName)))))), React.createElement(Stack, {
|
11819
12316
|
display: "flex",
|
11820
12317
|
flexDirection: "column",
|
11821
12318
|
gap: "12px"
|
11822
12319
|
}, React.createElement(Typography, {
|
12320
|
+
className: "chart-title",
|
11823
12321
|
sx: {
|
11824
12322
|
fontSize: "16px",
|
11825
12323
|
fontWeight: 700,
|
@@ -11828,7 +12326,8 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
11828
12326
|
}, t(TabList[0].label)), React.createElement(MyAnswer, {
|
11829
12327
|
data: resultDatas,
|
11830
12328
|
categories: categoryResponses,
|
11831
|
-
isStudent: isStudent
|
12329
|
+
isStudent: isStudent,
|
12330
|
+
isPrint: true
|
11832
12331
|
})), React.createElement(Stack, {
|
11833
12332
|
display: "flex",
|
11834
12333
|
flexDirection: "column",
|
@@ -11860,19 +12359,22 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
11860
12359
|
gap: "12px",
|
11861
12360
|
marginTop: "24px"
|
11862
12361
|
}, React.createElement(Typography, {
|
12362
|
+
className: "chart-title",
|
11863
12363
|
sx: {
|
11864
12364
|
fontSize: "16px",
|
11865
12365
|
fontWeight: 700,
|
11866
12366
|
color: "#414E62"
|
11867
12367
|
}
|
11868
12368
|
}, t(TabList[2].label)), React.createElement(CompareGrass, {
|
11869
|
-
effectSize: effectSize
|
12369
|
+
effectSize: effectSize,
|
12370
|
+
isPrint: true
|
11870
12371
|
})), React.createElement(Stack, {
|
11871
12372
|
display: "flex",
|
11872
12373
|
flexDirection: "column",
|
11873
12374
|
gap: "12px",
|
11874
12375
|
marginTop: "24px"
|
11875
12376
|
}, React.createElement(Typography, {
|
12377
|
+
className: "chart-title",
|
11876
12378
|
sx: {
|
11877
12379
|
fontSize: "16px",
|
11878
12380
|
fontWeight: 700,
|
@@ -11883,25 +12385,29 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
11883
12385
|
openProblem: _extends({}, openProblem, {
|
11884
12386
|
problem1: true
|
11885
12387
|
}),
|
11886
|
-
changeOpen: setOpenProblem
|
12388
|
+
changeOpen: setOpenProblem,
|
12389
|
+
isPrint: true
|
11887
12390
|
}), React.createElement(Vulnerable, {
|
11888
12391
|
data: resultDatas,
|
11889
12392
|
openProblem: _extends({}, openProblem, {
|
11890
12393
|
problem3: true
|
11891
12394
|
}),
|
11892
|
-
changeOpen: setOpenProblem
|
12395
|
+
changeOpen: setOpenProblem,
|
12396
|
+
isPrint: true
|
11893
12397
|
}), React.createElement(ProtractedProblem, {
|
11894
12398
|
data: longTimeSpend,
|
11895
12399
|
openProblem: _extends({}, openProblem, {
|
11896
12400
|
problem2: true
|
11897
12401
|
}),
|
11898
|
-
changeOpen: setOpenProblem
|
12402
|
+
changeOpen: setOpenProblem,
|
12403
|
+
isPrint: true
|
11899
12404
|
}), React.createElement(GradesByTerritory, {
|
11900
12405
|
data: categoryResponses,
|
11901
12406
|
openProblem: _extends({}, openProblem, {
|
11902
12407
|
problem4: true
|
11903
12408
|
}),
|
11904
|
-
changeOpen: setOpenProblem
|
12409
|
+
changeOpen: setOpenProblem,
|
12410
|
+
isPrint: true
|
11905
12411
|
})))), React.createElement(CreateNewQuestionDialog$1, {
|
11906
12412
|
examSessionId: resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.examSessionId,
|
11907
12413
|
handleCreateQuestion: handleCreateQuestion,
|