analytica-frontend-lib 1.2.69 → 1.2.71
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/ActivityCardQuestionBanks/index.js +8 -2
- package/dist/ActivityCardQuestionBanks/index.js.map +1 -1
- package/dist/ActivityCardQuestionBanks/index.mjs +8 -2
- package/dist/ActivityCardQuestionBanks/index.mjs.map +1 -1
- package/dist/ActivityCardQuestionPreview/index.js +8 -2
- package/dist/ActivityCardQuestionPreview/index.js.map +1 -1
- package/dist/ActivityCardQuestionPreview/index.mjs +8 -2
- package/dist/ActivityCardQuestionPreview/index.mjs.map +1 -1
- package/dist/ActivityDetails/index.d.ts +1 -1
- package/dist/ActivityDetails/index.d.ts.map +1 -1
- package/dist/ActivityDetails/index.js +55 -8
- package/dist/ActivityDetails/index.js.map +1 -1
- package/dist/ActivityDetails/index.mjs +55 -8
- package/dist/ActivityDetails/index.mjs.map +1 -1
- package/dist/ActivityPreview/index.js +8 -2
- package/dist/ActivityPreview/index.js.map +1 -1
- package/dist/ActivityPreview/index.mjs +8 -2
- package/dist/ActivityPreview/index.mjs.map +1 -1
- package/dist/CorrectActivityModal/index.js +54 -3
- package/dist/CorrectActivityModal/index.js.map +1 -1
- package/dist/CorrectActivityModal/index.mjs +54 -3
- package/dist/CorrectActivityModal/index.mjs.map +1 -1
- package/dist/index.js +55 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -8
- package/dist/index.mjs.map +1 -1
- package/dist/utils/questionRenderer/alternative/index.d.ts.map +1 -1
- package/dist/utils/questionRenderer/multipleChoice/index.d.ts.map +1 -1
- package/dist/utils/studentActivityCorrection/utils.d.ts +14 -0
- package/dist/utils/studentActivityCorrection/utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1393,12 +1393,15 @@ var renderQuestionAlternative = ({
|
|
|
1393
1393
|
question,
|
|
1394
1394
|
result
|
|
1395
1395
|
}) => {
|
|
1396
|
+
const hasAutoValidation = result?.options?.some(
|
|
1397
|
+
(op) => op.isCorrect !== void 0 && op.isCorrect !== null
|
|
1398
|
+
);
|
|
1396
1399
|
const alternatives = question.options?.map((option) => {
|
|
1397
1400
|
const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
1398
1401
|
const isSelected = result?.selectedOptions?.some(
|
|
1399
1402
|
(selectedOption) => selectedOption.optionId === option.id
|
|
1400
1403
|
) || false;
|
|
1401
|
-
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO
|
|
1404
|
+
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ || hasAutoValidation;
|
|
1402
1405
|
let status;
|
|
1403
1406
|
if (shouldShowCorrectAnswers) {
|
|
1404
1407
|
if (isCorrectOption) {
|
|
@@ -1572,12 +1575,15 @@ var renderQuestionMultipleChoice = ({
|
|
|
1572
1575
|
question,
|
|
1573
1576
|
result
|
|
1574
1577
|
}) => {
|
|
1578
|
+
const hasAutoValidation = result?.options?.some(
|
|
1579
|
+
(op) => op.isCorrect !== void 0 && op.isCorrect !== null
|
|
1580
|
+
);
|
|
1575
1581
|
const choices = question.options?.map((option) => {
|
|
1576
1582
|
const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
1577
1583
|
const isSelected = result?.selectedOptions?.some(
|
|
1578
1584
|
(op) => op.optionId === option.id
|
|
1579
1585
|
);
|
|
1580
|
-
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO
|
|
1586
|
+
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO */ || hasAutoValidation;
|
|
1581
1587
|
let status;
|
|
1582
1588
|
if (shouldShowCorrectAnswers) {
|
|
1583
1589
|
if (isCorrectOption) {
|