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
|
@@ -1378,12 +1378,15 @@ var renderQuestionAlternative = ({
|
|
|
1378
1378
|
question,
|
|
1379
1379
|
result
|
|
1380
1380
|
}) => {
|
|
1381
|
+
const hasAutoValidation = result?.options?.some(
|
|
1382
|
+
(op) => op.isCorrect !== void 0 && op.isCorrect !== null
|
|
1383
|
+
);
|
|
1381
1384
|
const alternatives = question.options?.map((option) => {
|
|
1382
1385
|
const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
1383
1386
|
const isSelected = result?.selectedOptions?.some(
|
|
1384
1387
|
(selectedOption) => selectedOption.optionId === option.id
|
|
1385
1388
|
) || false;
|
|
1386
|
-
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO
|
|
1389
|
+
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ || hasAutoValidation;
|
|
1387
1390
|
let status;
|
|
1388
1391
|
if (shouldShowCorrectAnswers) {
|
|
1389
1392
|
if (isCorrectOption) {
|
|
@@ -1557,12 +1560,15 @@ var renderQuestionMultipleChoice = ({
|
|
|
1557
1560
|
question,
|
|
1558
1561
|
result
|
|
1559
1562
|
}) => {
|
|
1563
|
+
const hasAutoValidation = result?.options?.some(
|
|
1564
|
+
(op) => op.isCorrect !== void 0 && op.isCorrect !== null
|
|
1565
|
+
);
|
|
1560
1566
|
const choices = question.options?.map((option) => {
|
|
1561
1567
|
const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
1562
1568
|
const isSelected = result?.selectedOptions?.some(
|
|
1563
1569
|
(op) => op.optionId === option.id
|
|
1564
1570
|
);
|
|
1565
|
-
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO
|
|
1571
|
+
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO */ || hasAutoValidation;
|
|
1566
1572
|
let status;
|
|
1567
1573
|
if (shouldShowCorrectAnswers) {
|
|
1568
1574
|
if (isCorrectOption) {
|