touchstudy-core 0.1.40 → 0.1.42
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/configs/constants.d.ts +73 -0
- package/dist/containers/ExamResult/hooks/useExamResult.d.ts +105 -25
- package/dist/index.js +898 -833
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +898 -833
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -2125,7 +2125,7 @@ var extra_time$1 = "Extra time";
|
|
2125
2125
|
var complete$1 = "Complete";
|
2126
2126
|
var current_exam$1 = "Current exam";
|
2127
2127
|
var current_time$1 = "Current time";
|
2128
|
-
var exam_time$1 = "
|
2128
|
+
var exam_time$1 = "Exam time";
|
2129
2129
|
var time_remaining$1 = "Time remaining";
|
2130
2130
|
var number_results$1 = "{{number}} Results";
|
2131
2131
|
var number_result$1 = "{{number}} Result";
|
@@ -8431,681 +8431,760 @@ var Roles$1;
|
|
8431
8431
|
Roles["Admin"] = "Admin";
|
8432
8432
|
})(Roles$1 || (Roles$1 = {}));
|
8433
8433
|
var EXAM_RESULT = {
|
8434
|
-
|
8435
|
-
|
8436
|
-
|
8437
|
-
|
8438
|
-
|
8439
|
-
|
8440
|
-
|
8441
|
-
|
8442
|
-
|
8443
|
-
|
8444
|
-
|
8445
|
-
|
8446
|
-
|
8447
|
-
|
8448
|
-
|
8449
|
-
|
8450
|
-
|
8451
|
-
|
8452
|
-
|
8453
|
-
|
8454
|
-
|
8455
|
-
|
8456
|
-
|
8457
|
-
|
8434
|
+
id: 6047,
|
8435
|
+
teacherId: 1,
|
8436
|
+
title: "EXAMPLE EXAM",
|
8437
|
+
examSessionId: 8,
|
8438
|
+
description: "",
|
8439
|
+
image: "",
|
8440
|
+
type: "",
|
8441
|
+
teacherName: "Admin",
|
8442
|
+
teacherAvatar: "https://lh3.googleusercontent.com/a/ACg8ocKoBjuFGZfJYrpnWcDgDRSy0AcVYTOP6s-WWLgxecLmRg=s96-c",
|
8443
|
+
finishTime: "0001-01-01T00:00:00+00:00",
|
8444
|
+
status: 3,
|
8445
|
+
startTime: "2024-03-13T04:28:48.768643+00:00",
|
8446
|
+
duration: "01:00:00",
|
8447
|
+
student: {
|
8448
|
+
id: 1001,
|
8449
|
+
phoneNumber: "",
|
8450
|
+
email: "",
|
8451
|
+
avatar: "https://lh3.googleusercontent.com/a/ACg8ocKtZwjUWLrcUGGP8Vf4i39FjR8rWYz0rDzwcpUBwgyDxm4=s96-c",
|
8452
|
+
parentName: "",
|
8453
|
+
parentPhoneNumber: "",
|
8454
|
+
schoolName: "Academy",
|
8455
|
+
className: "1",
|
8456
|
+
major: "",
|
8457
|
+
roles: []
|
8458
8458
|
},
|
8459
|
-
|
8460
|
-
|
8461
|
-
|
8462
|
-
|
8463
|
-
|
8464
|
-
|
8465
|
-
|
8466
|
-
|
8467
|
-
|
8468
|
-
|
8469
|
-
|
8470
|
-
|
8471
|
-
|
8472
|
-
|
8473
|
-
|
8474
|
-
|
8475
|
-
|
8476
|
-
|
8477
|
-
|
8459
|
+
questions: [{
|
8460
|
+
id: 8144,
|
8461
|
+
selectedAnswers: "1",
|
8462
|
+
correctAnswers: "2",
|
8463
|
+
isStar: false,
|
8464
|
+
duration: 320.939,
|
8465
|
+
classAverageTime: 238.939,
|
8466
|
+
topDuration: 180.939,
|
8467
|
+
answerResponseSignal: 0,
|
8468
|
+
isCorrect: false,
|
8469
|
+
answerTime: "2024-03-13T04:29:00.685+00:00",
|
8470
|
+
article: 1,
|
8471
|
+
category: {
|
8472
|
+
parentCategoryId: 5,
|
8473
|
+
name: "New category",
|
8474
|
+
path: "",
|
8475
|
+
numberOfQuestions: 0,
|
8476
|
+
numberOfChildren: 0,
|
8477
|
+
id: 7
|
8478
8478
|
},
|
8479
|
-
|
8480
|
-
|
8479
|
+
overallCorrectRate: 77,
|
8480
|
+
questionOrder: 0
|
8481
8481
|
}, {
|
8482
|
-
|
8483
|
-
|
8484
|
-
|
8485
|
-
|
8486
|
-
|
8487
|
-
|
8488
|
-
|
8489
|
-
|
8490
|
-
|
8491
|
-
|
8492
|
-
|
8493
|
-
|
8494
|
-
|
8495
|
-
|
8496
|
-
|
8497
|
-
|
8498
|
-
|
8499
|
-
|
8482
|
+
id: 8145,
|
8483
|
+
selectedAnswers: "2",
|
8484
|
+
correctAnswers: "3",
|
8485
|
+
isStar: false,
|
8486
|
+
duration: 2.014,
|
8487
|
+
classAverageTime: 2.014,
|
8488
|
+
topDuration: 2.014,
|
8489
|
+
answerResponseSignal: 1,
|
8490
|
+
isCorrect: false,
|
8491
|
+
answerTime: "2024-03-13T04:29:02.7+00:00",
|
8492
|
+
article: 1,
|
8493
|
+
category: {
|
8494
|
+
parentCategoryId: 5,
|
8495
|
+
name: "New category",
|
8496
|
+
path: "",
|
8497
|
+
numberOfQuestions: 0,
|
8498
|
+
numberOfChildren: 0,
|
8499
|
+
id: 7
|
8500
8500
|
},
|
8501
|
-
|
8502
|
-
|
8501
|
+
overallCorrectRate: 64,
|
8502
|
+
questionOrder: 1
|
8503
8503
|
}, {
|
8504
|
-
|
8505
|
-
|
8506
|
-
|
8507
|
-
|
8508
|
-
|
8509
|
-
|
8510
|
-
|
8511
|
-
|
8512
|
-
|
8513
|
-
|
8514
|
-
|
8515
|
-
|
8516
|
-
|
8517
|
-
|
8518
|
-
|
8519
|
-
|
8520
|
-
|
8521
|
-
|
8504
|
+
id: 8146,
|
8505
|
+
selectedAnswers: "1",
|
8506
|
+
correctAnswers: "2",
|
8507
|
+
isStar: false,
|
8508
|
+
duration: 72.244,
|
8509
|
+
classAverageTime: 52.244,
|
8510
|
+
topDuration: 24.244,
|
8511
|
+
answerResponseSignal: 1,
|
8512
|
+
isCorrect: false,
|
8513
|
+
answerTime: "2024-03-13T04:29:04.944+00:00",
|
8514
|
+
article: 1,
|
8515
|
+
category: {
|
8516
|
+
parentCategoryId: 5,
|
8517
|
+
name: "New category",
|
8518
|
+
path: "",
|
8519
|
+
numberOfQuestions: 0,
|
8520
|
+
numberOfChildren: 0,
|
8521
|
+
id: 7
|
8522
8522
|
},
|
8523
|
-
|
8524
|
-
|
8523
|
+
overallCorrectRate: 85,
|
8524
|
+
questionOrder: 2
|
8525
8525
|
}, {
|
8526
|
-
|
8527
|
-
|
8528
|
-
|
8529
|
-
|
8530
|
-
|
8531
|
-
|
8532
|
-
|
8533
|
-
|
8534
|
-
|
8535
|
-
|
8536
|
-
|
8537
|
-
|
8538
|
-
|
8539
|
-
|
8540
|
-
|
8541
|
-
|
8542
|
-
|
8543
|
-
|
8526
|
+
id: 8147,
|
8527
|
+
selectedAnswers: "1",
|
8528
|
+
correctAnswers: "1",
|
8529
|
+
isStar: false,
|
8530
|
+
duration: 1.373,
|
8531
|
+
classAverageTime: 1.373,
|
8532
|
+
topDuration: 1.373,
|
8533
|
+
answerResponseSignal: 4,
|
8534
|
+
isCorrect: true,
|
8535
|
+
answerTime: "2024-03-13T04:29:06.317+00:00",
|
8536
|
+
article: 1,
|
8537
|
+
category: {
|
8538
|
+
parentCategoryId: 5,
|
8539
|
+
name: "New category",
|
8540
|
+
path: "",
|
8541
|
+
numberOfQuestions: 0,
|
8542
|
+
numberOfChildren: 0,
|
8543
|
+
id: 7
|
8544
8544
|
},
|
8545
|
-
|
8546
|
-
|
8545
|
+
overallCorrectRate: 78.88,
|
8546
|
+
questionOrder: 3
|
8547
8547
|
}, {
|
8548
|
-
|
8549
|
-
|
8550
|
-
|
8551
|
-
|
8552
|
-
|
8553
|
-
|
8554
|
-
|
8555
|
-
|
8556
|
-
|
8557
|
-
|
8558
|
-
|
8559
|
-
|
8560
|
-
|
8561
|
-
|
8562
|
-
|
8563
|
-
|
8564
|
-
|
8565
|
-
|
8548
|
+
id: 8148,
|
8549
|
+
selectedAnswers: "3",
|
8550
|
+
correctAnswers: "4",
|
8551
|
+
isStar: false,
|
8552
|
+
duration: 120.683,
|
8553
|
+
classAverageTime: 132.683,
|
8554
|
+
topDuration: 110.683,
|
8555
|
+
answerResponseSignal: 2,
|
8556
|
+
isCorrect: false,
|
8557
|
+
answerTime: "2024-03-13T04:29:07+00:00",
|
8558
|
+
article: 1,
|
8559
|
+
category: {
|
8560
|
+
parentCategoryId: 5,
|
8561
|
+
name: "New category",
|
8562
|
+
path: "",
|
8563
|
+
numberOfQuestions: 0,
|
8564
|
+
numberOfChildren: 0,
|
8565
|
+
id: 7
|
8566
8566
|
},
|
8567
|
-
|
8568
|
-
|
8567
|
+
overallCorrectRate: 55.67,
|
8568
|
+
questionOrder: 4
|
8569
8569
|
}, {
|
8570
|
-
|
8571
|
-
|
8572
|
-
|
8573
|
-
|
8574
|
-
|
8575
|
-
|
8576
|
-
|
8577
|
-
|
8578
|
-
|
8579
|
-
|
8580
|
-
|
8581
|
-
|
8582
|
-
|
8583
|
-
|
8584
|
-
|
8585
|
-
|
8586
|
-
|
8587
|
-
|
8570
|
+
id: 8149,
|
8571
|
+
selectedAnswers: "2",
|
8572
|
+
correctAnswers: "2",
|
8573
|
+
isStar: false,
|
8574
|
+
duration: 1.052,
|
8575
|
+
classAverageTime: 1.052,
|
8576
|
+
topDuration: 1.052,
|
8577
|
+
answerResponseSignal: 1,
|
8578
|
+
isCorrect: true,
|
8579
|
+
answerTime: "2024-03-13T04:29:08.052+00:00",
|
8580
|
+
article: 2,
|
8581
|
+
category: {
|
8582
|
+
parentCategoryId: null,
|
8583
|
+
name: "123458868",
|
8584
|
+
path: "",
|
8585
|
+
numberOfQuestions: 0,
|
8586
|
+
numberOfChildren: 0,
|
8587
|
+
id: 1008
|
8588
8588
|
},
|
8589
|
-
|
8590
|
-
|
8589
|
+
overallCorrectRate: 100,
|
8590
|
+
questionOrder: 5
|
8591
8591
|
}, {
|
8592
|
-
|
8593
|
-
|
8594
|
-
|
8595
|
-
|
8596
|
-
|
8597
|
-
|
8598
|
-
|
8599
|
-
|
8600
|
-
|
8601
|
-
|
8602
|
-
|
8603
|
-
|
8604
|
-
|
8605
|
-
|
8606
|
-
|
8607
|
-
|
8608
|
-
|
8609
|
-
|
8592
|
+
id: 8150,
|
8593
|
+
selectedAnswers: "",
|
8594
|
+
correctAnswers: "3",
|
8595
|
+
isStar: false,
|
8596
|
+
duration: 0,
|
8597
|
+
classAverageTime: 0,
|
8598
|
+
topDuration: null,
|
8599
|
+
answerResponseSignal: null,
|
8600
|
+
isCorrect: false,
|
8601
|
+
answerTime: "0001-01-01T00:00:00+00:00",
|
8602
|
+
article: 2,
|
8603
|
+
category: {
|
8604
|
+
parentCategoryId: null,
|
8605
|
+
name: "123458868",
|
8606
|
+
path: "",
|
8607
|
+
numberOfQuestions: 0,
|
8608
|
+
numberOfChildren: 0,
|
8609
|
+
id: 1008
|
8610
8610
|
},
|
8611
|
-
|
8612
|
-
|
8611
|
+
overallCorrectRate: 55.67,
|
8612
|
+
questionOrder: 6
|
8613
8613
|
}, {
|
8614
|
-
|
8615
|
-
|
8616
|
-
|
8617
|
-
|
8618
|
-
|
8619
|
-
|
8620
|
-
|
8621
|
-
|
8622
|
-
|
8623
|
-
|
8624
|
-
|
8625
|
-
|
8626
|
-
|
8627
|
-
|
8628
|
-
|
8629
|
-
|
8630
|
-
|
8631
|
-
|
8614
|
+
id: 8151,
|
8615
|
+
selectedAnswers: "3",
|
8616
|
+
correctAnswers: "2",
|
8617
|
+
isStar: true,
|
8618
|
+
duration: 2.596,
|
8619
|
+
classAverageTime: 2.596,
|
8620
|
+
topDuration: 2.596,
|
8621
|
+
answerResponseSignal: 1,
|
8622
|
+
isCorrect: false,
|
8623
|
+
answerTime: "2024-03-13T04:29:10.648+00:00",
|
8624
|
+
article: 2,
|
8625
|
+
category: {
|
8626
|
+
parentCategoryId: null,
|
8627
|
+
name: "123458868",
|
8628
|
+
path: "",
|
8629
|
+
numberOfQuestions: 0,
|
8630
|
+
numberOfChildren: 0,
|
8631
|
+
id: 1008
|
8632
8632
|
},
|
8633
|
-
|
8634
|
-
|
8633
|
+
overallCorrectRate: 78.24,
|
8634
|
+
questionOrder: 7
|
8635
8635
|
}, {
|
8636
|
-
|
8637
|
-
|
8638
|
-
|
8639
|
-
|
8640
|
-
|
8641
|
-
|
8642
|
-
|
8643
|
-
|
8644
|
-
|
8645
|
-
|
8646
|
-
|
8647
|
-
|
8648
|
-
|
8649
|
-
|
8650
|
-
|
8651
|
-
|
8652
|
-
|
8653
|
-
|
8636
|
+
id: 8152,
|
8637
|
+
selectedAnswers: "5",
|
8638
|
+
correctAnswers: "4",
|
8639
|
+
isStar: false,
|
8640
|
+
duration: 0.899,
|
8641
|
+
classAverageTime: 0.899,
|
8642
|
+
topDuration: 0.899,
|
8643
|
+
answerResponseSignal: 1,
|
8644
|
+
isCorrect: false,
|
8645
|
+
answerTime: "2024-03-13T04:29:12.864+00:00",
|
8646
|
+
article: 2,
|
8647
|
+
category: {
|
8648
|
+
parentCategoryId: null,
|
8649
|
+
name: "123458868",
|
8650
|
+
path: "",
|
8651
|
+
numberOfQuestions: 0,
|
8652
|
+
numberOfChildren: 0,
|
8653
|
+
id: 1008
|
8654
8654
|
},
|
8655
|
-
|
8656
|
-
|
8655
|
+
overallCorrectRate: 90,
|
8656
|
+
questionOrder: 8
|
8657
8657
|
}, {
|
8658
|
-
|
8659
|
-
|
8660
|
-
|
8661
|
-
|
8662
|
-
|
8663
|
-
|
8664
|
-
|
8665
|
-
|
8666
|
-
|
8667
|
-
|
8668
|
-
|
8669
|
-
|
8670
|
-
|
8671
|
-
|
8672
|
-
|
8673
|
-
|
8674
|
-
|
8675
|
-
|
8658
|
+
id: 8153,
|
8659
|
+
selectedAnswers: "2",
|
8660
|
+
correctAnswers: "2",
|
8661
|
+
isStar: true,
|
8662
|
+
duration: 70.496,
|
8663
|
+
classAverageTime: 140.496,
|
8664
|
+
topDuration: 20.496,
|
8665
|
+
answerResponseSignal: 0,
|
8666
|
+
isCorrect: true,
|
8667
|
+
answerTime: "2024-03-13T04:29:14.36+00:00",
|
8668
|
+
article: 2,
|
8669
|
+
category: {
|
8670
|
+
parentCategoryId: null,
|
8671
|
+
name: "123458868",
|
8672
|
+
path: "",
|
8673
|
+
numberOfQuestions: 0,
|
8674
|
+
numberOfChildren: 0,
|
8675
|
+
id: 1008
|
8676
8676
|
},
|
8677
|
-
|
8678
|
-
|
8677
|
+
overallCorrectRate: 100,
|
8678
|
+
questionOrder: 9
|
8679
8679
|
}, {
|
8680
|
-
|
8681
|
-
|
8682
|
-
|
8683
|
-
|
8684
|
-
|
8685
|
-
|
8686
|
-
|
8687
|
-
|
8688
|
-
|
8689
|
-
|
8690
|
-
|
8691
|
-
|
8692
|
-
|
8693
|
-
|
8694
|
-
|
8695
|
-
|
8696
|
-
|
8697
|
-
|
8680
|
+
id: 8154,
|
8681
|
+
selectedAnswers: "",
|
8682
|
+
correctAnswers: "5",
|
8683
|
+
isStar: false,
|
8684
|
+
duration: 0,
|
8685
|
+
classAverageTime: 0,
|
8686
|
+
topDuration: null,
|
8687
|
+
answerResponseSignal: null,
|
8688
|
+
isCorrect: false,
|
8689
|
+
answerTime: "0001-01-01T00:00:00+00:00",
|
8690
|
+
article: 2,
|
8691
|
+
category: {
|
8692
|
+
parentCategoryId: null,
|
8693
|
+
name: "123458868",
|
8694
|
+
path: "",
|
8695
|
+
numberOfQuestions: 0,
|
8696
|
+
numberOfChildren: 0,
|
8697
|
+
id: 1008
|
8698
8698
|
},
|
8699
|
-
|
8700
|
-
|
8699
|
+
overallCorrectRate: 75,
|
8700
|
+
questionOrder: 10
|
8701
8701
|
}, {
|
8702
|
-
|
8703
|
-
|
8704
|
-
|
8705
|
-
|
8706
|
-
|
8707
|
-
|
8708
|
-
|
8709
|
-
|
8710
|
-
|
8711
|
-
|
8712
|
-
|
8713
|
-
|
8714
|
-
|
8715
|
-
|
8716
|
-
|
8717
|
-
|
8718
|
-
|
8719
|
-
|
8702
|
+
id: 8155,
|
8703
|
+
selectedAnswers: "2",
|
8704
|
+
correctAnswers: "2",
|
8705
|
+
isStar: false,
|
8706
|
+
duration: 1.317,
|
8707
|
+
classAverageTime: 1.317,
|
8708
|
+
topDuration: 1.317,
|
8709
|
+
answerResponseSignal: 1,
|
8710
|
+
isCorrect: true,
|
8711
|
+
answerTime: "2024-03-13T04:29:11.965+00:00",
|
8712
|
+
article: 3,
|
8713
|
+
category: {
|
8714
|
+
parentCategoryId: null,
|
8715
|
+
name: "The first category a",
|
8716
|
+
path: "",
|
8717
|
+
numberOfQuestions: 0,
|
8718
|
+
numberOfChildren: 0,
|
8719
|
+
id: 4
|
8720
8720
|
},
|
8721
|
-
|
8722
|
-
|
8721
|
+
overallCorrectRate: 100,
|
8722
|
+
questionOrder: 11
|
8723
8723
|
}, {
|
8724
|
-
|
8725
|
-
|
8726
|
-
|
8727
|
-
|
8728
|
-
|
8729
|
-
|
8730
|
-
|
8731
|
-
|
8732
|
-
|
8733
|
-
|
8734
|
-
|
8735
|
-
|
8736
|
-
|
8737
|
-
|
8738
|
-
|
8739
|
-
|
8740
|
-
|
8741
|
-
|
8724
|
+
id: 8156,
|
8725
|
+
selectedAnswers: "2",
|
8726
|
+
correctAnswers: "4",
|
8727
|
+
isStar: true,
|
8728
|
+
duration: 1.593,
|
8729
|
+
classAverageTime: 1.593,
|
8730
|
+
topDuration: 1.593,
|
8731
|
+
answerResponseSignal: 1,
|
8732
|
+
isCorrect: false,
|
8733
|
+
answerTime: "2024-03-13T04:29:20.734+00:00",
|
8734
|
+
article: 3,
|
8735
|
+
category: {
|
8736
|
+
parentCategoryId: null,
|
8737
|
+
name: "The first category a",
|
8738
|
+
path: "",
|
8739
|
+
numberOfQuestions: 0,
|
8740
|
+
numberOfChildren: 0,
|
8741
|
+
id: 4
|
8742
8742
|
},
|
8743
|
-
|
8744
|
-
|
8743
|
+
overallCorrectRate: 82,
|
8744
|
+
questionOrder: 12
|
8745
8745
|
}, {
|
8746
|
-
|
8747
|
-
|
8748
|
-
|
8749
|
-
|
8750
|
-
|
8751
|
-
|
8752
|
-
|
8753
|
-
|
8754
|
-
|
8755
|
-
|
8756
|
-
|
8757
|
-
|
8758
|
-
|
8759
|
-
|
8760
|
-
|
8761
|
-
|
8762
|
-
|
8763
|
-
|
8746
|
+
id: 8157,
|
8747
|
+
selectedAnswers: "2",
|
8748
|
+
correctAnswers: "5",
|
8749
|
+
isStar: true,
|
8750
|
+
duration: 1.204,
|
8751
|
+
classAverageTime: 1.204,
|
8752
|
+
topDuration: 1.204,
|
8753
|
+
answerResponseSignal: 1,
|
8754
|
+
isCorrect: false,
|
8755
|
+
answerTime: "2024-03-13T04:29:18.164+00:00",
|
8756
|
+
article: 3,
|
8757
|
+
category: {
|
8758
|
+
parentCategoryId: null,
|
8759
|
+
name: "The first category a",
|
8760
|
+
path: "",
|
8761
|
+
numberOfQuestions: 0,
|
8762
|
+
numberOfChildren: 0,
|
8763
|
+
id: 4
|
8764
8764
|
},
|
8765
|
-
|
8766
|
-
|
8765
|
+
overallCorrectRate: 67,
|
8766
|
+
questionOrder: 13
|
8767
8767
|
}, {
|
8768
|
-
|
8769
|
-
|
8770
|
-
|
8771
|
-
|
8772
|
-
|
8773
|
-
|
8774
|
-
|
8775
|
-
|
8776
|
-
|
8777
|
-
|
8778
|
-
|
8779
|
-
|
8780
|
-
|
8781
|
-
|
8782
|
-
|
8783
|
-
|
8784
|
-
|
8785
|
-
|
8768
|
+
id: 8158,
|
8769
|
+
selectedAnswers: "4",
|
8770
|
+
correctAnswers: "3",
|
8771
|
+
isStar: true,
|
8772
|
+
duration: 2.6,
|
8773
|
+
classAverageTime: 2.6,
|
8774
|
+
topDuration: 2.6,
|
8775
|
+
answerResponseSignal: 1,
|
8776
|
+
isCorrect: false,
|
8777
|
+
answerTime: "2024-03-13T04:29:16.96+00:00",
|
8778
|
+
article: 3,
|
8779
|
+
category: {
|
8780
|
+
parentCategoryId: null,
|
8781
|
+
name: "The first category a",
|
8782
|
+
path: "",
|
8783
|
+
numberOfQuestions: 0,
|
8784
|
+
numberOfChildren: 0,
|
8785
|
+
id: 4
|
8786
8786
|
},
|
8787
|
-
|
8788
|
-
|
8787
|
+
overallCorrectRate: 45,
|
8788
|
+
questionOrder: 14
|
8789
8789
|
}, {
|
8790
|
-
|
8791
|
-
|
8792
|
-
|
8793
|
-
|
8794
|
-
|
8795
|
-
|
8796
|
-
|
8797
|
-
|
8798
|
-
|
8799
|
-
|
8800
|
-
|
8801
|
-
|
8802
|
-
|
8803
|
-
|
8804
|
-
|
8805
|
-
|
8806
|
-
|
8807
|
-
|
8790
|
+
id: 8159,
|
8791
|
+
selectedAnswers: "3",
|
8792
|
+
correctAnswers: "3",
|
8793
|
+
isStar: true,
|
8794
|
+
duration: 0.977,
|
8795
|
+
classAverageTime: 0.977,
|
8796
|
+
topDuration: 0.977,
|
8797
|
+
answerResponseSignal: 1,
|
8798
|
+
isCorrect: true,
|
8799
|
+
answerTime: "2024-03-13T04:29:19.141+00:00",
|
8800
|
+
article: 3,
|
8801
|
+
category: {
|
8802
|
+
parentCategoryId: null,
|
8803
|
+
name: "The first category a",
|
8804
|
+
path: "",
|
8805
|
+
numberOfQuestions: 0,
|
8806
|
+
numberOfChildren: 0,
|
8807
|
+
id: 4
|
8808
8808
|
},
|
8809
|
-
|
8810
|
-
|
8809
|
+
overallCorrectRate: 100,
|
8810
|
+
questionOrder: 15
|
8811
8811
|
}],
|
8812
|
-
|
8813
|
-
|
8814
|
-
|
8815
|
-
|
8812
|
+
score: 10,
|
8813
|
+
placeOrder: 1,
|
8814
|
+
totalStudent: 1,
|
8815
|
+
totalTime: 30.987000000000002
|
8816
8816
|
};
|
8817
8817
|
var LONGTIME_SPEND_QUESTIONS = [{
|
8818
|
-
|
8819
|
-
|
8820
|
-
|
8821
|
-
|
8818
|
+
id: 8144,
|
8819
|
+
questionOrder: 0,
|
8820
|
+
duration: 320.939,
|
8821
|
+
topDuration: 145.32
|
8822
8822
|
}, {
|
8823
|
-
|
8824
|
-
|
8825
|
-
|
8826
|
-
|
8823
|
+
id: 8153,
|
8824
|
+
questionOrder: 9,
|
8825
|
+
duration: 70.496,
|
8826
|
+
topDuration: 30.22
|
8827
8827
|
}];
|
8828
8828
|
var EFFECT_SIZE_QUESTIONS = [{
|
8829
|
-
|
8830
|
-
|
8831
|
-
|
8832
|
-
|
8833
|
-
|
8834
|
-
|
8835
|
-
|
8836
|
-
|
8837
|
-
|
8829
|
+
id: 8144,
|
8830
|
+
questionOrder: 0,
|
8831
|
+
article: 1,
|
8832
|
+
isCorrect: false,
|
8833
|
+
selectedAnswers: "1",
|
8834
|
+
mostSelectedAnswers: "1",
|
8835
|
+
correctAnswers: "2",
|
8836
|
+
answerResponseSignal: 1,
|
8837
|
+
problemCategories: [3]
|
8838
8838
|
}, {
|
8839
|
-
|
8840
|
-
|
8841
|
-
|
8842
|
-
|
8843
|
-
|
8844
|
-
|
8845
|
-
|
8846
|
-
|
8847
|
-
|
8839
|
+
id: 8145,
|
8840
|
+
questionOrder: 1,
|
8841
|
+
article: 1,
|
8842
|
+
isCorrect: false,
|
8843
|
+
selectedAnswers: "2",
|
8844
|
+
mostSelectedAnswers: "2",
|
8845
|
+
correctAnswers: "3",
|
8846
|
+
answerResponseSignal: 1,
|
8847
|
+
problemCategories: [4]
|
8848
8848
|
}, {
|
8849
|
-
|
8850
|
-
|
8851
|
-
|
8852
|
-
|
8853
|
-
|
8854
|
-
|
8855
|
-
|
8856
|
-
|
8857
|
-
|
8849
|
+
id: 8146,
|
8850
|
+
questionOrder: 2,
|
8851
|
+
article: 1,
|
8852
|
+
isCorrect: false,
|
8853
|
+
selectedAnswers: "1",
|
8854
|
+
mostSelectedAnswers: "1",
|
8855
|
+
correctAnswers: "2",
|
8856
|
+
answerResponseSignal: 1,
|
8857
|
+
problemCategories: [3]
|
8858
8858
|
}, {
|
8859
|
-
|
8860
|
-
|
8861
|
-
|
8862
|
-
|
8863
|
-
|
8864
|
-
|
8865
|
-
|
8866
|
-
|
8867
|
-
|
8859
|
+
id: 8147,
|
8860
|
+
questionOrder: 3,
|
8861
|
+
article: 1,
|
8862
|
+
isCorrect: true,
|
8863
|
+
selectedAnswers: "1",
|
8864
|
+
mostSelectedAnswers: "1",
|
8865
|
+
correctAnswers: "1",
|
8866
|
+
answerResponseSignal: 1,
|
8867
|
+
problemCategories: [1]
|
8868
8868
|
}, {
|
8869
|
-
|
8870
|
-
|
8871
|
-
|
8872
|
-
|
8873
|
-
|
8874
|
-
|
8875
|
-
|
8876
|
-
|
8877
|
-
|
8869
|
+
id: 8148,
|
8870
|
+
questionOrder: 4,
|
8871
|
+
article: 1,
|
8872
|
+
isCorrect: false,
|
8873
|
+
selectedAnswers: "3",
|
8874
|
+
mostSelectedAnswers: "3",
|
8875
|
+
correctAnswers: "4",
|
8876
|
+
answerResponseSignal: 1,
|
8877
|
+
problemCategories: [4]
|
8878
8878
|
}, {
|
8879
|
-
|
8880
|
-
|
8881
|
-
|
8882
|
-
|
8883
|
-
|
8884
|
-
|
8885
|
-
|
8886
|
-
|
8887
|
-
|
8879
|
+
id: 8149,
|
8880
|
+
questionOrder: 5,
|
8881
|
+
article: 2,
|
8882
|
+
isCorrect: true,
|
8883
|
+
selectedAnswers: "2",
|
8884
|
+
mostSelectedAnswers: "2",
|
8885
|
+
correctAnswers: "2",
|
8886
|
+
answerResponseSignal: 1,
|
8887
|
+
problemCategories: [1]
|
8888
8888
|
}, {
|
8889
|
-
|
8890
|
-
|
8891
|
-
|
8892
|
-
|
8893
|
-
|
8894
|
-
|
8895
|
-
|
8896
|
-
|
8897
|
-
|
8889
|
+
id: 8150,
|
8890
|
+
questionOrder: 6,
|
8891
|
+
article: 2,
|
8892
|
+
isCorrect: false,
|
8893
|
+
selectedAnswers: "",
|
8894
|
+
mostSelectedAnswers: "",
|
8895
|
+
correctAnswers: "3",
|
8896
|
+
answerResponseSignal: null,
|
8897
|
+
problemCategories: []
|
8898
8898
|
}, {
|
8899
|
-
|
8900
|
-
|
8901
|
-
|
8902
|
-
|
8903
|
-
|
8904
|
-
|
8905
|
-
|
8906
|
-
|
8907
|
-
|
8899
|
+
id: 8151,
|
8900
|
+
questionOrder: 7,
|
8901
|
+
article: 2,
|
8902
|
+
isCorrect: false,
|
8903
|
+
selectedAnswers: "3",
|
8904
|
+
mostSelectedAnswers: "3",
|
8905
|
+
correctAnswers: "2",
|
8906
|
+
answerResponseSignal: 1,
|
8907
|
+
problemCategories: [2, 3]
|
8908
8908
|
}, {
|
8909
|
-
|
8910
|
-
|
8911
|
-
|
8912
|
-
|
8913
|
-
|
8914
|
-
|
8915
|
-
|
8916
|
-
|
8917
|
-
|
8909
|
+
id: 8152,
|
8910
|
+
questionOrder: 8,
|
8911
|
+
article: 2,
|
8912
|
+
isCorrect: false,
|
8913
|
+
selectedAnswers: "5",
|
8914
|
+
mostSelectedAnswers: "5",
|
8915
|
+
correctAnswers: "4",
|
8916
|
+
answerResponseSignal: 1,
|
8917
|
+
problemCategories: [4]
|
8918
8918
|
}, {
|
8919
|
-
|
8920
|
-
|
8921
|
-
|
8922
|
-
|
8923
|
-
|
8924
|
-
|
8925
|
-
|
8926
|
-
|
8927
|
-
|
8919
|
+
id: 8153,
|
8920
|
+
questionOrder: 9,
|
8921
|
+
article: 2,
|
8922
|
+
isCorrect: true,
|
8923
|
+
selectedAnswers: "2",
|
8924
|
+
mostSelectedAnswers: "2",
|
8925
|
+
correctAnswers: "2",
|
8926
|
+
answerResponseSignal: 1,
|
8927
|
+
problemCategories: [1]
|
8928
8928
|
}, {
|
8929
|
-
|
8930
|
-
|
8931
|
-
|
8932
|
-
|
8933
|
-
|
8934
|
-
|
8935
|
-
|
8936
|
-
|
8937
|
-
|
8929
|
+
id: 8154,
|
8930
|
+
questionOrder: 10,
|
8931
|
+
article: 2,
|
8932
|
+
isCorrect: false,
|
8933
|
+
selectedAnswers: "",
|
8934
|
+
mostSelectedAnswers: "",
|
8935
|
+
correctAnswers: "5",
|
8936
|
+
answerResponseSignal: null,
|
8937
|
+
problemCategories: []
|
8938
8938
|
}, {
|
8939
|
-
|
8940
|
-
|
8941
|
-
|
8942
|
-
|
8943
|
-
|
8944
|
-
|
8945
|
-
|
8946
|
-
|
8947
|
-
|
8939
|
+
id: 8155,
|
8940
|
+
questionOrder: 11,
|
8941
|
+
article: 3,
|
8942
|
+
isCorrect: true,
|
8943
|
+
selectedAnswers: "2",
|
8944
|
+
mostSelectedAnswers: "2",
|
8945
|
+
correctAnswers: "2",
|
8946
|
+
answerResponseSignal: 1,
|
8947
|
+
problemCategories: [1]
|
8948
8948
|
}, {
|
8949
|
-
|
8950
|
-
|
8951
|
-
|
8952
|
-
|
8953
|
-
|
8954
|
-
|
8955
|
-
|
8956
|
-
|
8957
|
-
|
8949
|
+
id: 8156,
|
8950
|
+
questionOrder: 12,
|
8951
|
+
article: 3,
|
8952
|
+
isCorrect: false,
|
8953
|
+
selectedAnswers: "2",
|
8954
|
+
mostSelectedAnswers: "2",
|
8955
|
+
correctAnswers: "4",
|
8956
|
+
answerResponseSignal: 1,
|
8957
|
+
problemCategories: [4]
|
8958
8958
|
}, {
|
8959
|
-
|
8960
|
-
|
8961
|
-
|
8962
|
-
|
8963
|
-
|
8964
|
-
|
8965
|
-
|
8966
|
-
|
8967
|
-
|
8959
|
+
id: 8157,
|
8960
|
+
questionOrder: 13,
|
8961
|
+
article: 3,
|
8962
|
+
isCorrect: false,
|
8963
|
+
selectedAnswers: "2",
|
8964
|
+
mostSelectedAnswers: "2",
|
8965
|
+
correctAnswers: "5",
|
8966
|
+
answerResponseSignal: 1,
|
8967
|
+
problemCategories: [4]
|
8968
8968
|
}, {
|
8969
|
-
|
8970
|
-
|
8971
|
-
|
8972
|
-
|
8973
|
-
|
8974
|
-
|
8975
|
-
|
8976
|
-
|
8977
|
-
|
8969
|
+
id: 8158,
|
8970
|
+
questionOrder: 14,
|
8971
|
+
article: 3,
|
8972
|
+
isCorrect: false,
|
8973
|
+
selectedAnswers: "4",
|
8974
|
+
mostSelectedAnswers: "4",
|
8975
|
+
correctAnswers: "3",
|
8976
|
+
answerResponseSignal: 1,
|
8977
|
+
problemCategories: [4]
|
8978
8978
|
}, {
|
8979
|
-
|
8980
|
-
|
8981
|
-
|
8982
|
-
|
8983
|
-
|
8984
|
-
|
8985
|
-
|
8986
|
-
|
8987
|
-
|
8979
|
+
id: 8159,
|
8980
|
+
questionOrder: 15,
|
8981
|
+
article: 3,
|
8982
|
+
isCorrect: true,
|
8983
|
+
selectedAnswers: "3",
|
8984
|
+
mostSelectedAnswers: "3",
|
8985
|
+
correctAnswers: "3",
|
8986
|
+
answerResponseSignal: 1,
|
8987
|
+
problemCategories: [1]
|
8988
8988
|
}];
|
8989
8989
|
var TIMELY_ORDER_QUESTIONS = [{
|
8990
|
-
|
8991
|
-
|
8992
|
-
|
8993
|
-
|
8994
|
-
|
8995
|
-
|
8996
|
-
|
8997
|
-
|
8990
|
+
categoryId: 7,
|
8991
|
+
categoryName: "New category",
|
8992
|
+
article: 1,
|
8993
|
+
questions: [{
|
8994
|
+
questionId: 8144,
|
8995
|
+
questionOrder: 0,
|
8996
|
+
answerOrder: 1,
|
8997
|
+
topAnswerOrder: 2
|
8998
8998
|
}, {
|
8999
|
-
|
9000
|
-
|
9001
|
-
|
9002
|
-
|
8999
|
+
questionId: 8145,
|
9000
|
+
questionOrder: 1,
|
9001
|
+
answerOrder: 2,
|
9002
|
+
topAnswerOrder: 1
|
9003
9003
|
}, {
|
9004
|
-
|
9005
|
-
|
9006
|
-
|
9007
|
-
|
9004
|
+
questionId: 8146,
|
9005
|
+
questionOrder: 2,
|
9006
|
+
answerOrder: 3,
|
9007
|
+
topAnswerOrder: 4
|
9008
9008
|
}, {
|
9009
|
-
|
9010
|
-
|
9011
|
-
|
9012
|
-
|
9009
|
+
questionId: 8147,
|
9010
|
+
questionOrder: 3,
|
9011
|
+
answerOrder: 4,
|
9012
|
+
topAnswerOrder: 5
|
9013
9013
|
}, {
|
9014
|
-
|
9015
|
-
|
9016
|
-
|
9017
|
-
|
9014
|
+
questionId: 8148,
|
9015
|
+
questionOrder: 4,
|
9016
|
+
answerOrder: 5,
|
9017
|
+
topAnswerOrder: 3
|
9018
9018
|
}]
|
9019
9019
|
}, {
|
9020
|
-
|
9021
|
-
|
9022
|
-
|
9023
|
-
|
9024
|
-
|
9025
|
-
|
9026
|
-
|
9027
|
-
|
9020
|
+
categoryId: 1008,
|
9021
|
+
categoryName: "123458868",
|
9022
|
+
article: 2,
|
9023
|
+
questions: [{
|
9024
|
+
questionId: 8149,
|
9025
|
+
questionOrder: 5,
|
9026
|
+
answerOrder: 1,
|
9027
|
+
topAnswerOrder: 5
|
9028
9028
|
}, {
|
9029
|
-
|
9030
|
-
|
9031
|
-
|
9032
|
-
|
9029
|
+
questionId: 8150,
|
9030
|
+
questionOrder: 6,
|
9031
|
+
answerOrder: null,
|
9032
|
+
topAnswerOrder: 2
|
9033
9033
|
}, {
|
9034
|
-
|
9035
|
-
|
9036
|
-
|
9037
|
-
|
9034
|
+
questionId: 8151,
|
9035
|
+
questionOrder: 7,
|
9036
|
+
answerOrder: 2,
|
9037
|
+
topAnswerOrder: 3
|
9038
9038
|
}, {
|
9039
|
-
|
9040
|
-
|
9041
|
-
|
9042
|
-
|
9039
|
+
questionId: 8152,
|
9040
|
+
questionOrder: 8,
|
9041
|
+
answerOrder: 3,
|
9042
|
+
topAnswerOrder: 4
|
9043
9043
|
}, {
|
9044
|
-
|
9045
|
-
|
9046
|
-
|
9047
|
-
|
9044
|
+
questionId: 8153,
|
9045
|
+
questionOrder: 9,
|
9046
|
+
answerOrder: 4,
|
9047
|
+
topAnswerOrder: 1
|
9048
9048
|
}, {
|
9049
|
-
|
9050
|
-
|
9051
|
-
|
9052
|
-
|
9049
|
+
questionId: 8154,
|
9050
|
+
questionOrder: 10,
|
9051
|
+
answerOrder: null,
|
9052
|
+
topAnswerOrder: 6
|
9053
9053
|
}]
|
9054
9054
|
}, {
|
9055
|
-
|
9056
|
-
|
9057
|
-
|
9058
|
-
|
9059
|
-
|
9060
|
-
|
9061
|
-
|
9062
|
-
|
9055
|
+
categoryId: 4,
|
9056
|
+
categoryName: "The first category a",
|
9057
|
+
article: 3,
|
9058
|
+
questions: [{
|
9059
|
+
questionId: 8155,
|
9060
|
+
questionOrder: 11,
|
9061
|
+
answerOrder: 1,
|
9062
|
+
topAnswerOrder: 3
|
9063
9063
|
}, {
|
9064
|
-
|
9065
|
-
|
9066
|
-
|
9067
|
-
|
9064
|
+
questionId: 8156,
|
9065
|
+
questionOrder: 12,
|
9066
|
+
answerOrder: 5,
|
9067
|
+
topAnswerOrder: 2
|
9068
9068
|
}, {
|
9069
|
-
|
9070
|
-
|
9071
|
-
|
9072
|
-
|
9069
|
+
questionId: 8157,
|
9070
|
+
questionOrder: 13,
|
9071
|
+
answerOrder: 3,
|
9072
|
+
topAnswerOrder: 1
|
9073
9073
|
}, {
|
9074
|
-
|
9075
|
-
|
9076
|
-
|
9077
|
-
|
9074
|
+
questionId: 8158,
|
9075
|
+
questionOrder: 14,
|
9076
|
+
answerOrder: 2,
|
9077
|
+
topAnswerOrder: 4
|
9078
9078
|
}, {
|
9079
|
-
|
9080
|
-
|
9081
|
-
|
9082
|
-
|
9079
|
+
questionId: 8159,
|
9080
|
+
questionOrder: 15,
|
9081
|
+
answerOrder: 4,
|
9082
|
+
topAnswerOrder: 5
|
9083
9083
|
}]
|
9084
9084
|
}];
|
9085
9085
|
var CATEGORY_RESPONSES = [{
|
9086
|
-
|
9087
|
-
|
9088
|
-
|
9089
|
-
|
9090
|
-
|
9091
|
-
|
9086
|
+
id: 7,
|
9087
|
+
name: "New category",
|
9088
|
+
totalQuestions: 5,
|
9089
|
+
totalCorrectQuestions: 1,
|
9090
|
+
totalAnsweredQuestions: 5,
|
9091
|
+
percentageAmongStudents: 17
|
9092
9092
|
}, {
|
9093
|
-
|
9094
|
-
|
9095
|
-
|
9096
|
-
|
9097
|
-
|
9098
|
-
|
9093
|
+
id: 1008,
|
9094
|
+
name: "123458868",
|
9095
|
+
totalQuestions: 6,
|
9096
|
+
totalCorrectQuestions: 2,
|
9097
|
+
totalAnsweredQuestions: 4,
|
9098
|
+
percentageAmongStudents: 48
|
9099
9099
|
}, {
|
9100
|
-
|
9101
|
-
|
9102
|
-
|
9103
|
-
|
9104
|
-
|
9105
|
-
|
9100
|
+
id: 4,
|
9101
|
+
name: "The first category a",
|
9102
|
+
totalQuestions: 5,
|
9103
|
+
totalCorrectQuestions: 2,
|
9104
|
+
totalAnsweredQuestions: 5,
|
9105
|
+
percentageAmongStudents: 40
|
9106
9106
|
}];
|
9107
|
+
var DEFAULT_LINE_CHART_OPTIONS = {
|
9108
|
+
chart: {
|
9109
|
+
type: "line",
|
9110
|
+
toolbar: {
|
9111
|
+
show: false
|
9112
|
+
},
|
9113
|
+
zoom: {
|
9114
|
+
enabled: false
|
9115
|
+
}
|
9116
|
+
},
|
9117
|
+
tooltip: {
|
9118
|
+
enabled: true,
|
9119
|
+
hideEmptySeries: true
|
9120
|
+
},
|
9121
|
+
legend: {
|
9122
|
+
show: true,
|
9123
|
+
fontSize: "12px",
|
9124
|
+
fontWeight: 600,
|
9125
|
+
markers: {
|
9126
|
+
width: 16,
|
9127
|
+
height: 1
|
9128
|
+
},
|
9129
|
+
labels: {
|
9130
|
+
colors: "#414E62"
|
9131
|
+
},
|
9132
|
+
itemMargin: {
|
9133
|
+
vertical: 16
|
9134
|
+
}
|
9135
|
+
},
|
9136
|
+
dataLabels: {
|
9137
|
+
enabled: false
|
9138
|
+
},
|
9139
|
+
xaxis: {
|
9140
|
+
categories: [],
|
9141
|
+
axisBorder: {
|
9142
|
+
show: true,
|
9143
|
+
color: "#E4E7EC"
|
9144
|
+
},
|
9145
|
+
labels: {
|
9146
|
+
style: {
|
9147
|
+
fontSize: "10px"
|
9148
|
+
}
|
9149
|
+
}
|
9150
|
+
},
|
9151
|
+
grid: {
|
9152
|
+
row: {
|
9153
|
+
colors: ["#FFFFFF"]
|
9154
|
+
},
|
9155
|
+
borderColor: "#E4E7EC",
|
9156
|
+
xaxis: {
|
9157
|
+
lines: {
|
9158
|
+
show: true
|
9159
|
+
}
|
9160
|
+
}
|
9161
|
+
},
|
9162
|
+
yaxis: {
|
9163
|
+
stepSize: 1,
|
9164
|
+
min: 0,
|
9165
|
+
axisBorder: {
|
9166
|
+
show: true,
|
9167
|
+
color: "#E4E7EC"
|
9168
|
+
},
|
9169
|
+
labels: {
|
9170
|
+
style: {
|
9171
|
+
fontSize: "10px"
|
9172
|
+
}
|
9173
|
+
}
|
9174
|
+
}
|
9175
|
+
};
|
9176
|
+
var defaultSeries = function defaultSeries(t) {
|
9177
|
+
return [{
|
9178
|
+
name: t("my_problem_solving_order"),
|
9179
|
+
data: []
|
9180
|
+
}, {
|
9181
|
+
name: t("top_rankings_problem_solving_order"),
|
9182
|
+
data: []
|
9183
|
+
}];
|
9184
|
+
};
|
9107
9185
|
|
9108
|
-
var useExamResult = function useExamResult(searchParam, navigate, examSessionId, studentId, code) {
|
9186
|
+
var useExamResult = function useExamResult(searchParam, navigate, examSessionId, studentId, code, handleChangeTab) {
|
9187
|
+
var _allChartOptions$data, _allSeries$dataChartI;
|
9109
9188
|
if (examSessionId === void 0) {
|
9110
9189
|
examSessionId = 0;
|
9111
9190
|
}
|
@@ -9137,8 +9216,8 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
9137
9216
|
longTimeSpend = _useState3[0],
|
9138
9217
|
setLongTimeSpend = _useState3[1];
|
9139
9218
|
var _useState4 = React.useState([]),
|
9140
|
-
|
9141
|
-
|
9219
|
+
timelyOrderQuestions = _useState4[0],
|
9220
|
+
setTimelyOrderQuestions = _useState4[1];
|
9142
9221
|
var _useState5 = React.useState([]),
|
9143
9222
|
categoryResponses = _useState5[0],
|
9144
9223
|
setCategoryResponses = _useState5[1];
|
@@ -9164,10 +9243,11 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
9164
9243
|
var _temp = _catch(function () {
|
9165
9244
|
return Promise.resolve(Promise.all([getResults(examCode), getResultsLongTimeSpend(examCode), getResultsEffectSize(examCode), getResultsTimeOrderQuestion(examCode), getResultsCategories(examCode)])).then(function (result) {
|
9166
9245
|
var _result$0$data, _result$1$data, _result$2$data, _result$3$data, _result$4$data;
|
9246
|
+
handleChangeTab(0);
|
9167
9247
|
setResultDatas((_result$0$data = result[0].data) === null || _result$0$data === void 0 ? void 0 : _result$0$data.data);
|
9168
9248
|
setLongTimeSpend((_result$1$data = result[1].data) === null || _result$1$data === void 0 ? void 0 : _result$1$data.data);
|
9169
9249
|
setEffectSize((_result$2$data = result[2].data) === null || _result$2$data === void 0 ? void 0 : _result$2$data.data);
|
9170
|
-
|
9250
|
+
setTimelyOrderQuestions((_result$3$data = result[3].data) === null || _result$3$data === void 0 ? void 0 : _result$3$data.data);
|
9171
9251
|
setCategoryResponses(((_result$4$data = result[4].data) === null || _result$4$data === void 0 ? void 0 : _result$4$data.data) || []);
|
9172
9252
|
});
|
9173
9253
|
}, function (error) {
|
@@ -9198,10 +9278,11 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
9198
9278
|
var _temp5 = _catch(function () {
|
9199
9279
|
return Promise.resolve(Promise.all([getResultsTeacher(examSessionId, studentId), getResultsLongTimeSpendTeacher(examSessionId, studentId), getResultsEffectSizeTeacher(examSessionId, studentId), getResultsTimeOrderQuestionTeacher(examSessionId, studentId), getResultsCategoriesTeacher(examSessionId, studentId)])).then(function (result) {
|
9200
9280
|
var _result$0$data2, _result$1$data2, _result$2$data2, _result$3$data2, _result$4$data2;
|
9281
|
+
handleChangeTab(0);
|
9201
9282
|
setResultDatas((_result$0$data2 = result[0].data) === null || _result$0$data2 === void 0 ? void 0 : _result$0$data2.data);
|
9202
9283
|
setLongTimeSpend((_result$1$data2 = result[1].data) === null || _result$1$data2 === void 0 ? void 0 : _result$1$data2.data);
|
9203
9284
|
setEffectSize((_result$2$data2 = result[2].data) === null || _result$2$data2 === void 0 ? void 0 : _result$2$data2.data);
|
9204
|
-
|
9285
|
+
setTimelyOrderQuestions((_result$3$data2 = result[3].data) === null || _result$3$data2 === void 0 ? void 0 : _result$3$data2.data);
|
9205
9286
|
setCategoryResponses(((_result$4$data2 = result[4].data) === null || _result$4$data2 === void 0 ? void 0 : _result$4$data2.data) || []);
|
9206
9287
|
});
|
9207
9288
|
}, function (error) {
|
@@ -9227,7 +9308,7 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
9227
9308
|
setResultDatas(EXAM_RESULT);
|
9228
9309
|
setLongTimeSpend(LONGTIME_SPEND_QUESTIONS);
|
9229
9310
|
setEffectSize(EFFECT_SIZE_QUESTIONS);
|
9230
|
-
|
9311
|
+
setTimelyOrderQuestions(TIMELY_ORDER_QUESTIONS);
|
9231
9312
|
setCategoryResponses(CATEGORY_RESPONSES);
|
9232
9313
|
};
|
9233
9314
|
React.useEffect(function () {
|
@@ -9243,7 +9324,7 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
9243
9324
|
}
|
9244
9325
|
};
|
9245
9326
|
var handleNextChart = function handleNextChart() {
|
9246
|
-
if (dataChartIndex <
|
9327
|
+
if (dataChartIndex < timelyOrderQuestions.length - 1) {
|
9247
9328
|
setDataChartIndex(dataChartIndex + 1);
|
9248
9329
|
}
|
9249
9330
|
};
|
@@ -9261,158 +9342,98 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
9261
9342
|
seconds: totalTime % 60
|
9262
9343
|
});
|
9263
9344
|
}, [JSON.stringify(resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.questions), language]);
|
9264
|
-
var
|
9265
|
-
return {
|
9266
|
-
|
9267
|
-
|
9268
|
-
|
9269
|
-
|
9270
|
-
|
9271
|
-
|
9272
|
-
|
9273
|
-
|
9274
|
-
|
9275
|
-
|
9276
|
-
|
9277
|
-
|
9278
|
-
|
9279
|
-
|
9280
|
-
|
9281
|
-
|
9282
|
-
|
9283
|
-
|
9284
|
-
|
9345
|
+
var allChartOptions = React.useMemo(function () {
|
9346
|
+
return timelyOrderQuestions.map(function (timelyOrderQuestion) {
|
9347
|
+
return _extends({}, DEFAULT_LINE_CHART_OPTIONS, {
|
9348
|
+
tooltip: _extends({}, DEFAULT_LINE_CHART_OPTIONS.tooltip, {
|
9349
|
+
y: {
|
9350
|
+
formatter: function formatter(val, _ref) {
|
9351
|
+
var dataPointIndex = _ref.dataPointIndex;
|
9352
|
+
if (dataPointIndex > 0) {
|
9353
|
+
var _questions$length, _questions;
|
9354
|
+
var questions = timelyOrderQuestion.questions || null;
|
9355
|
+
var questionLength = (_questions$length = questions === null || questions === void 0 ? void 0 : questions.length) != null ? _questions$length : 0;
|
9356
|
+
return val != null ? t("problem_number_question", {
|
9357
|
+
number: questions !== null ? (((_questions = questions[questionLength - val]) === null || _questions === void 0 ? void 0 : _questions.questionOrder) || 0) + 1 : val
|
9358
|
+
}) : t("no_data");
|
9359
|
+
}
|
9360
|
+
return null;
|
9361
|
+
}
|
9362
|
+
}
|
9363
|
+
}),
|
9364
|
+
xaxis: _extends({}, DEFAULT_LINE_CHART_OPTIONS.xaxis, {
|
9365
|
+
categories: ["."].concat(Array.from({
|
9366
|
+
length: timelyOrderQuestion ? timelyOrderQuestion.questions.length : 1
|
9367
|
+
}, function (_, i) {
|
9368
|
+
return ORDER_NUMBERS[i + 1] ? t(ORDER_NUMBERS[i + 1]) : toNumberOrder(i + 1);
|
9369
|
+
}), ["."])
|
9370
|
+
}),
|
9371
|
+
yaxis: _extends({}, DEFAULT_LINE_CHART_OPTIONS.yaxis, {
|
9372
|
+
tickAmount: timelyOrderQuestion.questions.length + 1,
|
9373
|
+
max: timelyOrderQuestion.questions.length + 1,
|
9374
|
+
labels: _extends({}, DEFAULT_LINE_CHART_OPTIONS.yaxis.labels, {
|
9375
|
+
formatter: function formatter(val) {
|
9376
|
+
var _questions$length2, _questions2;
|
9377
|
+
var questions = timelyOrderQuestion.questions || null;
|
9378
|
+
var questionLength = (_questions$length2 = questions === null || questions === void 0 ? void 0 : questions.length) != null ? _questions$length2 : 0;
|
9285
9379
|
return val != null ? t("problem_number_question", {
|
9286
|
-
number: questions !== null ? (((
|
9380
|
+
number: questions !== null ? (((_questions2 = questions[questionLength - val]) === null || _questions2 === void 0 ? void 0 : _questions2.questionOrder) || 0) + 1 : val
|
9287
9381
|
}) : t("no_data");
|
9288
9382
|
}
|
9289
|
-
|
9290
|
-
|
9291
|
-
}
|
9292
|
-
},
|
9293
|
-
legend: {
|
9294
|
-
show: true,
|
9295
|
-
fontSize: "12px",
|
9296
|
-
fontWeight: 600,
|
9297
|
-
markers: {
|
9298
|
-
width: 16,
|
9299
|
-
height: 1
|
9300
|
-
},
|
9301
|
-
labels: {
|
9302
|
-
colors: "#414E62"
|
9303
|
-
},
|
9304
|
-
itemMargin: {
|
9305
|
-
vertical: 16
|
9306
|
-
}
|
9307
|
-
},
|
9308
|
-
dataLabels: {
|
9309
|
-
enabled: false
|
9310
|
-
},
|
9311
|
-
xaxis: {
|
9312
|
-
categories: ["."].concat(Array.from({
|
9313
|
-
length: timelyOrderQuestion[dataChartIndex] ? timelyOrderQuestion[dataChartIndex].questions.length : 1
|
9314
|
-
}, function (_, i) {
|
9315
|
-
return ORDER_NUMBERS[i + 1] ? t(ORDER_NUMBERS[i + 1]) : toNumberOrder(i + 1);
|
9316
|
-
}), ["."]),
|
9317
|
-
axisBorder: {
|
9318
|
-
show: true,
|
9319
|
-
color: "#E4E7EC"
|
9320
|
-
},
|
9321
|
-
labels: {
|
9322
|
-
style: {
|
9323
|
-
fontSize: "10px"
|
9324
|
-
}
|
9325
|
-
}
|
9326
|
-
},
|
9327
|
-
grid: {
|
9328
|
-
row: {
|
9329
|
-
colors: ["#FFFFFF"]
|
9330
|
-
},
|
9331
|
-
borderColor: "#E4E7EC",
|
9332
|
-
xaxis: {
|
9333
|
-
lines: {
|
9334
|
-
show: true
|
9335
|
-
}
|
9336
|
-
}
|
9337
|
-
},
|
9338
|
-
yaxis: {
|
9339
|
-
tickAmount: timelyOrderQuestion[dataChartIndex] ? timelyOrderQuestion[dataChartIndex].questions.length + 1 : 1,
|
9340
|
-
stepSize: 1,
|
9341
|
-
min: 0,
|
9342
|
-
max: timelyOrderQuestion[dataChartIndex] ? timelyOrderQuestion[dataChartIndex].questions.length + 1 : 1,
|
9343
|
-
axisBorder: {
|
9344
|
-
show: true,
|
9345
|
-
color: "#E4E7EC"
|
9346
|
-
},
|
9347
|
-
labels: {
|
9348
|
-
formatter: function formatter(val) {
|
9349
|
-
var _timelyOrderQuestion$2, _questions$length2, _questions2;
|
9350
|
-
var questions = ((_timelyOrderQuestion$2 = timelyOrderQuestion[dataChartIndex]) === null || _timelyOrderQuestion$2 === void 0 ? void 0 : _timelyOrderQuestion$2.questions) || null;
|
9351
|
-
var questionLength = (_questions$length2 = questions === null || questions === void 0 ? void 0 : questions.length) != null ? _questions$length2 : 0;
|
9352
|
-
return val != null ? t("problem_number_question", {
|
9353
|
-
number: questions !== null ? (((_questions2 = questions[questionLength - val]) === null || _questions2 === void 0 ? void 0 : _questions2.questionOrder) || 0) + 1 : val
|
9354
|
-
}) : t("no_data");
|
9355
|
-
},
|
9356
|
-
style: {
|
9357
|
-
fontSize: "10px"
|
9358
|
-
}
|
9359
|
-
}
|
9360
|
-
}
|
9361
|
-
};
|
9362
|
-
}, [JSON.stringify(timelyOrderQuestion), dataChartIndex, language]);
|
9363
|
-
var series = React.useMemo(function () {
|
9364
|
-
if (!timelyOrderQuestion.length || timelyOrderQuestion.length < dataChartIndex + 1 || dataChartIndex < 0) return [{
|
9365
|
-
name: t("my_problem_solving_order"),
|
9366
|
-
data: []
|
9367
|
-
}, {
|
9368
|
-
name: t("top_rankings_problem_solving_order"),
|
9369
|
-
data: []
|
9370
|
-
}];
|
9371
|
-
var data = timelyOrderQuestion[dataChartIndex];
|
9372
|
-
var questionsData = data.questions.sort(function (a, b) {
|
9373
|
-
return a.questionOrder > b.questionOrder ? 1 : b.questionOrder > a.questionOrder ? -1 : 0;
|
9374
|
-
}).map(function (i, index) {
|
9375
|
-
return _extends({}, i, {
|
9376
|
-
questionOrder: index,
|
9377
|
-
answerOrder: i.answerOrder == null ? 0 : i.answerOrder,
|
9378
|
-
topAnswerOrder: i.topAnswerOrder == null ? 0 : i.topAnswerOrder
|
9383
|
+
})
|
9384
|
+
})
|
9379
9385
|
});
|
9380
9386
|
});
|
9381
|
-
|
9382
|
-
|
9383
|
-
|
9384
|
-
|
9385
|
-
|
9386
|
-
|
9387
|
-
|
9388
|
-
|
9389
|
-
|
9390
|
-
|
9391
|
-
|
9392
|
-
|
9393
|
-
|
9394
|
-
|
9395
|
-
|
9396
|
-
|
9397
|
-
|
9398
|
-
|
9399
|
-
|
9400
|
-
|
9401
|
-
|
9402
|
-
|
9403
|
-
|
9404
|
-
|
9405
|
-
|
9406
|
-
|
9387
|
+
}, [JSON.stringify(timelyOrderQuestions), language]);
|
9388
|
+
var allSeries = React.useMemo(function () {
|
9389
|
+
return timelyOrderQuestions.map(function (timelyOrderQuestion) {
|
9390
|
+
var questionsData = timelyOrderQuestion.questions.sort(function (a, b) {
|
9391
|
+
return a.questionOrder > b.questionOrder ? 1 : b.questionOrder > a.questionOrder ? -1 : 0;
|
9392
|
+
}).map(function (i, index) {
|
9393
|
+
return _extends({}, i, {
|
9394
|
+
questionOrder: index,
|
9395
|
+
answerOrder: i.answerOrder == null ? 0 : i.answerOrder,
|
9396
|
+
topAnswerOrder: i.topAnswerOrder == null ? 0 : i.topAnswerOrder
|
9397
|
+
});
|
9398
|
+
});
|
9399
|
+
var mySeriesData = [null].concat(_.sortBy(questionsData.filter(function (i) {
|
9400
|
+
return i.answerOrder !== 0;
|
9401
|
+
}), ["answerOrder", "questionOrder"]).map(function (item) {
|
9402
|
+
return timelyOrderQuestion.questions.length - item.questionOrder;
|
9403
|
+
}), questionsData.filter(function (i) {
|
9404
|
+
return i.answerOrder === 0;
|
9405
|
+
}).map(function () {
|
9406
|
+
return null;
|
9407
|
+
}), [null]);
|
9408
|
+
var topSeriesData = [null].concat(_.sortBy(questionsData.filter(function (i) {
|
9409
|
+
return i.topAnswerOrder !== 0;
|
9410
|
+
}), ["topAnswerOrder", "questionOrder"]).map(function (item) {
|
9411
|
+
return timelyOrderQuestion.questions.length - item.questionOrder;
|
9412
|
+
}), questionsData.filter(function (i) {
|
9413
|
+
return i.topAnswerOrder === 0;
|
9414
|
+
}).map(function () {
|
9415
|
+
return null;
|
9416
|
+
}), [null]);
|
9417
|
+
return [{
|
9418
|
+
name: t("my_problem_solving_order"),
|
9419
|
+
data: mySeriesData
|
9420
|
+
}, {
|
9421
|
+
name: t("top_rankings_problem_solving_order"),
|
9422
|
+
data: topSeriesData
|
9423
|
+
}];
|
9424
|
+
});
|
9425
|
+
}, [JSON.stringify(timelyOrderQuestions), language]);
|
9426
|
+
var chartOptions = (_allChartOptions$data = allChartOptions[dataChartIndex]) != null ? _allChartOptions$data : DEFAULT_LINE_CHART_OPTIONS;
|
9427
|
+
var series = (_allSeries$dataChartI = allSeries[dataChartIndex]) != null ? _allSeries$dataChartI : defaultSeries(t);
|
9407
9428
|
var handleExportPdf = function handleExportPdf() {
|
9408
9429
|
try {
|
9409
|
-
var
|
9430
|
+
var _temp24 = function _temp24(_result) {
|
9410
9431
|
if (_exit) return _result;
|
9411
9432
|
dispatch(setLoading(false));
|
9412
9433
|
};
|
9413
9434
|
var _exit = false;
|
9414
9435
|
dispatch(setLoading(true));
|
9415
|
-
var
|
9436
|
+
var _temp23 = _catch(function () {
|
9416
9437
|
var canvas = document.querySelector("#canvas");
|
9417
9438
|
var headerCanvas = document.querySelector("#header-canvas");
|
9418
9439
|
if (!canvas || !headerCanvas) {
|
@@ -9434,7 +9455,7 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
9434
9455
|
var imgWidth = WIDTH_PAPER;
|
9435
9456
|
var chartWidth = WIDTH_PAPER - 20;
|
9436
9457
|
return Promise.resolve(html2canvas(headerCanvas)).then(function (header) {
|
9437
|
-
function
|
9458
|
+
function _temp22() {
|
9438
9459
|
doc.save("download.pdf");
|
9439
9460
|
}
|
9440
9461
|
var imgHeaderHeight = header.height * imgWidth / header.width;
|
@@ -9442,110 +9463,133 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
9442
9463
|
doc.addImage(imgHeaderData, 'PNG', 0, 0, imgWidth, imgHeaderHeight);
|
9443
9464
|
line += imgHeaderHeight;
|
9444
9465
|
if (line > HEIGHT_PAPER) breakPage();
|
9445
|
-
var
|
9466
|
+
var _temp21 = function () {
|
9446
9467
|
if (canvas && canvas.childElementCount > 0) {
|
9447
9468
|
var _index = 0;
|
9448
|
-
var
|
9469
|
+
var _temp20 = _for(function () {
|
9449
9470
|
return _index < canvas.childElementCount;
|
9450
9471
|
}, function () {
|
9451
9472
|
return _index++;
|
9452
9473
|
}, function () {
|
9453
|
-
function
|
9454
|
-
function
|
9474
|
+
function _temp19() {
|
9475
|
+
function _temp17() {
|
9455
9476
|
line += 20;
|
9456
9477
|
}
|
9457
|
-
var
|
9478
|
+
var printChartTitle = function printChartTitle() {
|
9479
|
+
try {
|
9480
|
+
if (chartTitleData && chartTitleHeight) {
|
9481
|
+
if (line + chartTitleHeight + 10 > HEIGHT_PAPER) breakPage();else line + 10;
|
9482
|
+
doc.addImage(chartTitleData, 'PNG', 10, line, chartWidth, chartTitleHeight);
|
9483
|
+
line += chartTitleHeight;
|
9484
|
+
}
|
9485
|
+
return Promise.resolve();
|
9486
|
+
} catch (e) {
|
9487
|
+
return Promise.reject(e);
|
9488
|
+
}
|
9489
|
+
};
|
9490
|
+
var _temp16 = function () {
|
9458
9491
|
if (printContainerEls.length) {
|
9459
|
-
var
|
9460
|
-
function
|
9492
|
+
var _temp15 = _forTo(printContainerEls, function (i) {
|
9493
|
+
function _temp14() {
|
9461
9494
|
var printHeader = function printHeader(top) {
|
9462
9495
|
if (top === void 0) {
|
9463
9496
|
top = 0;
|
9464
9497
|
}
|
9465
9498
|
try {
|
9466
|
-
if (!
|
9467
|
-
var _height = printHeaderCanvas.height * chartWidth / printHeaderCanvas.width;
|
9468
|
-
var _data = printHeaderCanvas.toDataURL('image/png');
|
9499
|
+
if (!printHeaderData || !printHeaderHeight) return Promise.resolve();
|
9469
9500
|
line += top;
|
9470
|
-
if (line +
|
9471
|
-
doc.addImage(
|
9472
|
-
line +=
|
9501
|
+
if (line + printHeaderHeight > HEIGHT_PAPER) breakPage();
|
9502
|
+
doc.addImage(printHeaderData, 'PNG', 10, line, chartWidth, printHeaderHeight);
|
9503
|
+
line += printHeaderHeight;
|
9473
9504
|
return Promise.resolve();
|
9474
9505
|
} catch (e) {
|
9475
9506
|
return Promise.reject(e);
|
9476
9507
|
}
|
9477
9508
|
};
|
9478
|
-
|
9479
|
-
|
9480
|
-
|
9481
|
-
var
|
9482
|
-
|
9483
|
-
|
9484
|
-
|
9485
|
-
|
9486
|
-
|
9509
|
+
var printContents = printContainerEl.querySelectorAll("." + PrintContentClassName);
|
9510
|
+
if (!printContents.length) return;
|
9511
|
+
var _temp12 = _forTo(printContents, function (j) {
|
9512
|
+
var rowItem = printContents[j];
|
9513
|
+
return Promise.resolve(html2canvas(rowItem)).then(function (rowItemCanvas) {
|
9514
|
+
function _temp11() {
|
9515
|
+
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
9516
|
+
line += height;
|
9517
|
+
}
|
9518
|
+
var height = rowItemCanvas.height * chartWidth / rowItemCanvas.width;
|
9519
|
+
var data = rowItemCanvas.toDataURL('image/png');
|
9520
|
+
if (i === 0 && j === 0 && line + height + (printHeaderHeight || 0) + ((chartTitleHeight || 0) + 10) + 20 > HEIGHT_PAPER) breakPage();
|
9521
|
+
i === 0 && j === 0 && printChartTitle();
|
9522
|
+
var _temp10 = function () {
|
9523
|
+
if (line + height + 20 > HEIGHT_PAPER) {
|
9524
|
+
breakPage();
|
9525
|
+
return Promise.resolve(printHeader()).then(function () {});
|
9526
|
+
} else {
|
9527
|
+
var _temp25 = function () {
|
9528
|
+
if (j === 0) {
|
9529
|
+
return Promise.resolve(printHeader(10)).then(function () {});
|
9530
|
+
}
|
9531
|
+
}();
|
9532
|
+
if (_temp25 && _temp25.then) return _temp25.then(function () {});
|
9487
9533
|
}
|
9488
|
-
|
9489
|
-
|
9490
|
-
var _temp9 = function () {
|
9491
|
-
if (line + height > HEIGHT_PAPER) {
|
9492
|
-
breakPage();
|
9493
|
-
return Promise.resolve(printHeader()).then(function () {});
|
9494
|
-
}
|
9495
|
-
}();
|
9496
|
-
return _temp9 && _temp9.then ? _temp9.then(_temp10) : _temp10(_temp9);
|
9497
|
-
});
|
9534
|
+
}();
|
9535
|
+
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
|
9498
9536
|
});
|
9499
|
-
if (_temp11 && _temp11.then) return _temp11.then(function () {});
|
9500
9537
|
});
|
9538
|
+
if (_temp12 && _temp12.then) return _temp12.then(function () {});
|
9501
9539
|
}
|
9502
9540
|
var printContainerEl = printContainerEls[i];
|
9503
9541
|
var printHeaderEl = printContainerEl.querySelector("." + PrintHeaderClassName);
|
9504
9542
|
var printHeaderCanvas = null;
|
9505
|
-
var
|
9543
|
+
var printHeaderHeight = null;
|
9544
|
+
var printHeaderData = "";
|
9545
|
+
var _temp13 = function () {
|
9506
9546
|
if (printHeaderEl) {
|
9507
|
-
return Promise.resolve(html2canvas(printHeaderEl)).then(function (
|
9508
|
-
printHeaderCanvas =
|
9547
|
+
return Promise.resolve(html2canvas(printHeaderEl)).then(function (_html2canvas2) {
|
9548
|
+
printHeaderCanvas = _html2canvas2;
|
9549
|
+
printHeaderHeight = printHeaderCanvas.height * chartWidth / printHeaderCanvas.width;
|
9550
|
+
printHeaderData = printHeaderCanvas.toDataURL('image/png');
|
9509
9551
|
});
|
9510
9552
|
}
|
9511
9553
|
}();
|
9512
|
-
return
|
9554
|
+
return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
|
9513
9555
|
});
|
9514
|
-
if (
|
9556
|
+
if (_temp15 && _temp15.then) return _temp15.then(function () {});
|
9515
9557
|
} else {
|
9516
9558
|
return Promise.resolve(html2canvas(chart)).then(function (chartCanvas) {
|
9517
9559
|
var imgBodyHeight = chartCanvas.height * chartWidth / chartCanvas.width;
|
9518
9560
|
var imgBodyData = chartCanvas.toDataURL('image/png');
|
9519
9561
|
line += 10;
|
9520
|
-
if (line + imgBodyHeight > HEIGHT_PAPER) breakPage();
|
9562
|
+
if (line + imgBodyHeight + 20 + (chartTitleHeight || 0) > HEIGHT_PAPER) breakPage();
|
9563
|
+
printChartTitle();
|
9521
9564
|
doc.addImage(imgBodyData, 'PNG', 10, line, chartWidth, imgBodyHeight);
|
9522
9565
|
line += imgBodyHeight;
|
9523
9566
|
});
|
9524
9567
|
}
|
9525
9568
|
}();
|
9526
|
-
return
|
9569
|
+
return _temp16 && _temp16.then ? _temp16.then(_temp17) : _temp17(_temp16);
|
9527
9570
|
}
|
9528
9571
|
var chart = canvas.children.item(_index);
|
9529
9572
|
if (chart.getAttribute("id") === "header-canvas") return;
|
9530
9573
|
var chartTitle = chart.querySelector(".chart-title");
|
9531
9574
|
var printContainerEls = chart.querySelectorAll("." + PrintContainerClassName);
|
9532
|
-
var
|
9575
|
+
var printChartTitleCanvas = null;
|
9576
|
+
var chartTitleHeight = null;
|
9577
|
+
var chartTitleData = "";
|
9578
|
+
var _temp18 = function () {
|
9533
9579
|
if (chartTitle && printContainerEls.length) {
|
9534
|
-
return Promise.resolve(html2canvas(chartTitle)).then(function (
|
9535
|
-
|
9536
|
-
|
9537
|
-
|
9538
|
-
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
9539
|
-
line += height;
|
9580
|
+
return Promise.resolve(html2canvas(chartTitle)).then(function (_html2canvas) {
|
9581
|
+
printChartTitleCanvas = _html2canvas;
|
9582
|
+
chartTitleHeight = printChartTitleCanvas.height * chartWidth / printChartTitleCanvas.width;
|
9583
|
+
chartTitleData = printChartTitleCanvas.toDataURL('image/png');
|
9540
9584
|
});
|
9541
9585
|
}
|
9542
9586
|
}();
|
9543
|
-
return
|
9587
|
+
return _temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18);
|
9544
9588
|
});
|
9545
|
-
if (
|
9589
|
+
if (_temp20 && _temp20.then) return _temp20.then(function () {});
|
9546
9590
|
}
|
9547
9591
|
}();
|
9548
|
-
return
|
9592
|
+
return _temp21 && _temp21.then ? _temp21.then(_temp22) : _temp22(_temp21);
|
9549
9593
|
});
|
9550
9594
|
}, function (error) {
|
9551
9595
|
console.log({
|
@@ -9553,21 +9597,27 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
9553
9597
|
});
|
9554
9598
|
reactToastify.toast.error("Print pdf failure!");
|
9555
9599
|
});
|
9556
|
-
return Promise.resolve(
|
9600
|
+
return Promise.resolve(_temp23 && _temp23.then ? _temp23.then(_temp24) : _temp24(_temp23));
|
9557
9601
|
} catch (e) {
|
9558
9602
|
return Promise.reject(e);
|
9559
9603
|
}
|
9560
9604
|
};
|
9605
|
+
var examTime = React.useMemo(function () {
|
9606
|
+
return utcToLocalTime(resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.startTime, "HH:mm") + " ~ " + utcToLocalTime(resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.finishTime, "HH:mm");
|
9607
|
+
}, [resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.startTime, resultDatas === null || resultDatas === void 0 ? void 0 : resultDatas.finishTime]);
|
9561
9608
|
return {
|
9609
|
+
examTime: examTime,
|
9562
9610
|
series: series,
|
9563
9611
|
chartOptions: chartOptions,
|
9612
|
+
allChartOptions: allChartOptions,
|
9613
|
+
allSeries: allSeries,
|
9564
9614
|
dataChartIndex: dataChartIndex,
|
9565
9615
|
totalTime: totalTime,
|
9566
9616
|
isStudent: isStudent,
|
9567
9617
|
resultDatas: resultDatas,
|
9568
9618
|
effectSize: effectSize,
|
9569
9619
|
longTimeSpend: longTimeSpend,
|
9570
|
-
|
9620
|
+
timelyOrderQuestions: timelyOrderQuestions,
|
9571
9621
|
openProblem: openProblem,
|
9572
9622
|
categoryResponses: categoryResponses,
|
9573
9623
|
setOpenProblem: setOpenProblem,
|
@@ -11173,7 +11223,7 @@ function MyAnswer(_ref) {
|
|
11173
11223
|
});
|
11174
11224
|
};
|
11175
11225
|
var renderPrintQuestions = function renderPrintQuestions(questions) {
|
11176
|
-
var chunkedQuestions = _.chunk(questions,
|
11226
|
+
var chunkedQuestions = _.chunk(questions, 10);
|
11177
11227
|
return chunkedQuestions.map(function (i, index) {
|
11178
11228
|
return React__default.createElement("div", {
|
11179
11229
|
key: index,
|
@@ -11382,7 +11432,7 @@ var CompareGrass = function CompareGrass(_ref) {
|
|
11382
11432
|
});
|
11383
11433
|
};
|
11384
11434
|
var renderPrintTableBody = function renderPrintTableBody(effectSize) {
|
11385
|
-
var chunkedEffectSizeQuestions = _.chunk(effectSize,
|
11435
|
+
var chunkedEffectSizeQuestions = _.chunk(effectSize, 10);
|
11386
11436
|
return chunkedEffectSizeQuestions.map(function (i, index) {
|
11387
11437
|
return React__default.createElement("tbody", {
|
11388
11438
|
key: index,
|
@@ -11441,9 +11491,9 @@ var iconUpArrow = function iconUpArrow(_ref) {
|
|
11441
11491
|
}, React__default.createElement("path", {
|
11442
11492
|
d: "M5.25 15.375L12 8.625L18.75 15.375",
|
11443
11493
|
stroke: "#CED2DA",
|
11444
|
-
|
11445
|
-
|
11446
|
-
|
11494
|
+
strokeWidth: "2",
|
11495
|
+
strokeLinecap: "round",
|
11496
|
+
strokeLinejoin: "round"
|
11447
11497
|
}));
|
11448
11498
|
};
|
11449
11499
|
|
@@ -11462,9 +11512,9 @@ var iconDownArrow = function iconDownArrow(_ref) {
|
|
11462
11512
|
}, React__default.createElement("path", {
|
11463
11513
|
d: "M5.25 8.625L12 15.375L18.75 8.625",
|
11464
11514
|
stroke: "#CED2DA",
|
11465
|
-
|
11466
|
-
|
11467
|
-
|
11515
|
+
strokeWidth: "2",
|
11516
|
+
strokeLinecap: "round",
|
11517
|
+
strokeLinejoin: "round"
|
11468
11518
|
}));
|
11469
11519
|
};
|
11470
11520
|
|
@@ -11751,7 +11801,7 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
11751
11801
|
});
|
11752
11802
|
};
|
11753
11803
|
var renderPrintCategories = function renderPrintCategories() {
|
11754
|
-
var chunkedCategories = _.chunk(data,
|
11804
|
+
var chunkedCategories = _.chunk(data, 10);
|
11755
11805
|
return chunkedCategories.map(function (i, index) {
|
11756
11806
|
return React__default.createElement("div", {
|
11757
11807
|
key: index,
|
@@ -11977,11 +12027,17 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
11977
12027
|
examSessionId = _ref.examSessionId,
|
11978
12028
|
studentId = _ref.studentId,
|
11979
12029
|
code = _ref.code;
|
11980
|
-
var
|
12030
|
+
var _useTab = useTab(),
|
12031
|
+
selected = _useTab.selected,
|
12032
|
+
handleChangeTab = _useTab.handleChangeTab;
|
12033
|
+
var _useExamResult = useExamResult(searchParams, onNavigate, examSessionId, studentId, code, handleChangeTab),
|
12034
|
+
examTime = _useExamResult.examTime,
|
11981
12035
|
series = _useExamResult.series,
|
12036
|
+
allSeries = _useExamResult.allSeries,
|
11982
12037
|
chartOptions = _useExamResult.chartOptions,
|
12038
|
+
allChartOptions = _useExamResult.allChartOptions,
|
11983
12039
|
dataChartIndex = _useExamResult.dataChartIndex,
|
11984
|
-
|
12040
|
+
timelyOrderQuestions = _useExamResult.timelyOrderQuestions,
|
11985
12041
|
isStudent = _useExamResult.isStudent,
|
11986
12042
|
openProblem = _useExamResult.openProblem,
|
11987
12043
|
resultDatas = _useExamResult.resultDatas,
|
@@ -11998,11 +12054,8 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
11998
12054
|
handleCreateQuestion = _useCreateQuestionDia.handleCreateQuestion,
|
11999
12055
|
openCreateQuestionDialog = _useCreateQuestionDia.openCreateQuestionDialog,
|
12000
12056
|
toggleCreateQuestion = _useCreateQuestionDia.toggleCreateQuestion;
|
12001
|
-
var _useTab = useTab(),
|
12002
|
-
selected = _useTab.selected,
|
12003
|
-
handleChangeTab = _useTab.handleChangeTab;
|
12004
12057
|
var isTabletUp = material.useMediaQuery('(min-width:900px)');
|
12005
|
-
return React__default.createElement(React.Fragment, null,
|
12058
|
+
return React__default.createElement(React.Fragment, null, timelyOrderQuestions[dataChartIndex] && longTimeSpend && resultDatas && effectSize ? React__default.createElement("div", {
|
12006
12059
|
style: {
|
12007
12060
|
width: "100%"
|
12008
12061
|
}
|
@@ -12068,7 +12121,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
12068
12121
|
fontWeight: 600,
|
12069
12122
|
color: "#414E62"
|
12070
12123
|
}
|
12071
|
-
},
|
12124
|
+
}, examTime)), React__default.createElement(material.Stack, null, React__default.createElement(material.Typography, {
|
12072
12125
|
sx: {
|
12073
12126
|
fontSize: "13px",
|
12074
12127
|
fontWeight: 600,
|
@@ -12139,6 +12192,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
12139
12192
|
var label = _ref2.label,
|
12140
12193
|
value = _ref2.value;
|
12141
12194
|
return React__default.createElement(material.Button, {
|
12195
|
+
key: label,
|
12142
12196
|
className: styles["truncate"],
|
12143
12197
|
disableTouchRipple: true,
|
12144
12198
|
sx: {
|
@@ -12186,7 +12240,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
12186
12240
|
options: chartOptions,
|
12187
12241
|
series: series
|
12188
12242
|
}))), React__default.createElement("div", {
|
12189
|
-
className: styles$4["nextChart"] + " " + (dataChartIndex <
|
12243
|
+
className: styles$4["nextChart"] + " " + (dataChartIndex < timelyOrderQuestions.length - 1 && "pointer"),
|
12190
12244
|
onClick: handleNextChart
|
12191
12245
|
}, React__default.createElement(iconBtnNextChart, null)))), React__default.createElement(CustomTabPanel, {
|
12192
12246
|
value: selected,
|
@@ -12284,7 +12338,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
12284
12338
|
fontWeight: 600,
|
12285
12339
|
color: "#414E62"
|
12286
12340
|
}
|
12287
|
-
},
|
12341
|
+
}, examTime)), React__default.createElement(material.Stack, null, React__default.createElement(material.Typography, {
|
12288
12342
|
sx: {
|
12289
12343
|
fontSize: "13px",
|
12290
12344
|
fontWeight: 600,
|
@@ -12317,7 +12371,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
12317
12371
|
}, React__default.createElement(material.Typography, {
|
12318
12372
|
className: "chart-title",
|
12319
12373
|
sx: {
|
12320
|
-
fontSize: "
|
12374
|
+
fontSize: "18px",
|
12321
12375
|
fontWeight: 700,
|
12322
12376
|
color: "#414E62"
|
12323
12377
|
}
|
@@ -12332,26 +12386,37 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
12332
12386
|
gap: "12px",
|
12333
12387
|
marginTop: "24px"
|
12334
12388
|
}, React__default.createElement(material.Typography, {
|
12389
|
+
className: "chart-title",
|
12335
12390
|
sx: {
|
12336
|
-
fontSize: "
|
12391
|
+
fontSize: "18px",
|
12337
12392
|
fontWeight: 700,
|
12338
12393
|
color: "#414E62"
|
12339
12394
|
}
|
12340
|
-
}, t(TabList[1].label)),
|
12341
|
-
|
12342
|
-
|
12343
|
-
|
12344
|
-
|
12345
|
-
|
12346
|
-
|
12347
|
-
|
12348
|
-
|
12349
|
-
|
12350
|
-
|
12351
|
-
|
12352
|
-
|
12353
|
-
|
12354
|
-
|
12395
|
+
}, t(TabList[1].label)), timelyOrderQuestions.map(function (timelyOrderQuestion, index) {
|
12396
|
+
return React__default.createElement("div", {
|
12397
|
+
key: index,
|
12398
|
+
className: PrintContainerClassName
|
12399
|
+
}, React__default.createElement(material.Typography, {
|
12400
|
+
className: "pb-2 " + PrintHeaderClassName,
|
12401
|
+
sx: {
|
12402
|
+
fontSize: "14px",
|
12403
|
+
fontWeight: 700,
|
12404
|
+
color: "#414E62"
|
12405
|
+
}
|
12406
|
+
}, t("article_number"), " ", timelyOrderQuestion.article), React__default.createElement("div", {
|
12407
|
+
className: styles$4["compareChart"] + " " + PrintContentClassName
|
12408
|
+
}, React__default.createElement("div", {
|
12409
|
+
className: "" + styles$4["prevChart"]
|
12410
|
+
}), React__default.createElement("div", {
|
12411
|
+
className: styles$4["chart"] + " sr-line-chart"
|
12412
|
+
}, React__default.createElement("div", null, React__default.createElement(ReactApexChart, {
|
12413
|
+
height: 389,
|
12414
|
+
options: allChartOptions[index],
|
12415
|
+
series: allSeries[index]
|
12416
|
+
}))), React__default.createElement("div", {
|
12417
|
+
className: "" + styles$4["nextChart"]
|
12418
|
+
})));
|
12419
|
+
})), React__default.createElement(material.Stack, {
|
12355
12420
|
display: "flex",
|
12356
12421
|
flexDirection: "column",
|
12357
12422
|
gap: "12px",
|
@@ -12359,7 +12424,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
12359
12424
|
}, React__default.createElement(material.Typography, {
|
12360
12425
|
className: "chart-title",
|
12361
12426
|
sx: {
|
12362
|
-
fontSize: "
|
12427
|
+
fontSize: "18px",
|
12363
12428
|
fontWeight: 700,
|
12364
12429
|
color: "#414E62"
|
12365
12430
|
}
|
@@ -12374,7 +12439,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
12374
12439
|
}, React__default.createElement(material.Typography, {
|
12375
12440
|
className: "chart-title",
|
12376
12441
|
sx: {
|
12377
|
-
fontSize: "
|
12442
|
+
fontSize: "18px",
|
12378
12443
|
fontWeight: 700,
|
12379
12444
|
color: "#414E62"
|
12380
12445
|
}
|