From 5ff66dd2eb2e331edd04eba342216eada92fb01a Mon Sep 17 00:00:00 2001 From: Arunima George Date: Tue, 23 Jul 2024 11:02:43 +0100 Subject: [PATCH] TD-3707: Fixed issue on first question expanding after all questions answered. --- .../Scripts/vuesrc/resource/blocks/BlocksView.vue | 1 + .../Scripts/vuesrc/resource/blocks/QuestionBlock.vue | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/blocks/BlocksView.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/blocks/BlocksView.vue index 80d065f7a..895642d01 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/blocks/BlocksView.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/blocks/BlocksView.vue @@ -35,6 +35,7 @@ :firstUnansweredQuestion="pagesProgress.map((e, i) => i < questionInFocus || e).findIndex(p => !p) === index" :isQuestionInFocus="questionInFocus === index" :answerInOrder="answerInOrder" + :allQuestAnswered="allQuestionsAnswered" @updateQuestionProgress="isComplete => pushUpdate(index, isComplete)" @nextPage="$emit('nextPage')" @submitAssessmentAnswers="answers => $emit(`submitAssessmentAnswers`, answers, block.blockRef)" diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/blocks/QuestionBlock.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/blocks/QuestionBlock.vue index 20945e6f2..1b63cd809 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/blocks/QuestionBlock.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/blocks/QuestionBlock.vue @@ -179,7 +179,8 @@ isQuestionInFocus: { type: Boolean, default: false }, firstUnansweredQuestion: Boolean, matchQuestionsState: { type: Array } as PropOptions, - answerInOrder: Boolean + answerInOrder: Boolean, + allQuestAnswered: { type: Boolean, default: false } }, components: { MatchGameSubmissionView, @@ -268,6 +269,9 @@ }, isQuestionInFocus(value) { this.isOpen = value; + if (this.allQuestAnswered) { + this.isOpen = false; + } } }, methods: {