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
|
@@ -3265,12 +3265,15 @@ var renderQuestionAlternative = ({
|
|
|
3265
3265
|
question,
|
|
3266
3266
|
result
|
|
3267
3267
|
}) => {
|
|
3268
|
+
const hasAutoValidation = result?.options?.some(
|
|
3269
|
+
(op) => op.isCorrect !== void 0 && op.isCorrect !== null
|
|
3270
|
+
);
|
|
3268
3271
|
const alternatives = question.options?.map((option) => {
|
|
3269
3272
|
const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
3270
3273
|
const isSelected = result?.selectedOptions?.some(
|
|
3271
3274
|
(selectedOption) => selectedOption.optionId === option.id
|
|
3272
3275
|
) || false;
|
|
3273
|
-
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO
|
|
3276
|
+
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ || hasAutoValidation;
|
|
3274
3277
|
let status;
|
|
3275
3278
|
if (shouldShowCorrectAnswers) {
|
|
3276
3279
|
if (isCorrectOption) {
|
|
@@ -3444,12 +3447,15 @@ var renderQuestionMultipleChoice = ({
|
|
|
3444
3447
|
question,
|
|
3445
3448
|
result
|
|
3446
3449
|
}) => {
|
|
3450
|
+
const hasAutoValidation = result?.options?.some(
|
|
3451
|
+
(op) => op.isCorrect !== void 0 && op.isCorrect !== null
|
|
3452
|
+
);
|
|
3447
3453
|
const choices = question.options?.map((option) => {
|
|
3448
3454
|
const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
3449
3455
|
const isSelected = result?.selectedOptions?.some(
|
|
3450
3456
|
(op) => op.optionId === option.id
|
|
3451
3457
|
);
|
|
3452
|
-
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO
|
|
3458
|
+
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO */ || hasAutoValidation;
|
|
3453
3459
|
let status;
|
|
3454
3460
|
if (shouldShowCorrectAnswers) {
|
|
3455
3461
|
if (isCorrectOption) {
|