From 5dca14921a624cc7f55561f062483bed460fd157 Mon Sep 17 00:00:00 2001 From: Jorg Are Date: Mon, 16 Dec 2024 21:18:11 +0100 Subject: [PATCH] fix: peer review bug (#261) * fix: resolve ORA peer review issue * fix: resolve visual glitch with validateBeforeConfirmation function * fix: update StepProgressIndicator Component --- src/components/StepProgressIndicator/index.jsx | 2 +- src/views/SubmissionView/hooks/useSubmissionValidationStatus.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/StepProgressIndicator/index.jsx b/src/components/StepProgressIndicator/index.jsx index 062dc311..685b0c18 100644 --- a/src/components/StepProgressIndicator/index.jsx +++ b/src/components/StepProgressIndicator/index.jsx @@ -53,7 +53,7 @@ const StepProgressIndicator = ({ step }) => { && !(step === stepNames.peer && stepInfo[step].isWaitingForSubmissions) && !(step === stepNames.studentTraining && needed === done); - if (stepNames.peer === step && done >= needed) { + if (loadNextAction?.action && stepNames.peer === step && done >= needed) { loadNextAction.action.labels.default = formatMessage(messages.gradeNextPeerOptional); } return ( diff --git a/src/views/SubmissionView/hooks/useSubmissionValidationStatus.js b/src/views/SubmissionView/hooks/useSubmissionValidationStatus.js index 9ce9c618..a2265eb8 100644 --- a/src/views/SubmissionView/hooks/useSubmissionValidationStatus.js +++ b/src/views/SubmissionView/hooks/useSubmissionValidationStatus.js @@ -35,8 +35,8 @@ const useSubmissionStatuses = (textResponses, uploadedFiles) => { } const calcFileUploadIsRequired = submissionConfig.fileResponseConfig.required && !uploadedFiles.length; setFileUploadIsRequired(calcFileUploadIsRequired); + setPromptStatuses(retrievePromptsSubmissionStatus); if (containsInvalidPrompts || (submissionConfig.fileResponseConfig.required && !uploadedFiles.length)) { - setPromptStatuses(retrievePromptsSubmissionStatus); return false; }