From 5d0f9756adc1adc4829c9ba9463672334042f4eb Mon Sep 17 00:00:00 2001 From: vishnubansal Date: Sat, 13 Jul 2024 20:34:11 +0530 Subject: [PATCH] handle for practice assessment attempt count 0 allowed --- .../overview/overview.component.html | 16 +++++++-------- .../components/overview/overview.component.ts | 4 ++-- .../plugins/practice/practice.component.ts | 20 ++++++++++--------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/project/ws/viewer/src/lib/plugins/practice/components/overview/overview.component.html b/project/ws/viewer/src/lib/plugins/practice/components/overview/overview.component.html index c12560d6a1..00f23d62cf 100755 --- a/project/ws/viewer/src/lib/plugins/practice/components/overview/overview.component.html +++ b/project/ws/viewer/src/lib/plugins/practice/components/overview/overview.component.html @@ -83,24 +83,24 @@
- - {{'playerbrief.maxAllowedRetake' | translate}} + {{'playerbrief.maxAllowedRetake' | translate}}
@@ -162,10 +162,10 @@

{{ 'practiceoverview.summary' | translate }}

- - {{'playerbrief.maxAllowedRetake' | translate}} + {{'playerbrief.maxAllowedRetake' | translate}}
diff --git a/project/ws/viewer/src/lib/plugins/practice/components/overview/overview.component.ts b/project/ws/viewer/src/lib/plugins/practice/components/overview/overview.component.ts index 4dbad87547..221bb656c5 100755 --- a/project/ws/viewer/src/lib/plugins/practice/components/overview/overview.component.ts +++ b/project/ws/viewer/src/lib/plugins/practice/components/overview/overview.component.ts @@ -62,11 +62,11 @@ export class OverviewComponent implements OnInit, OnChanges, OnDestroy { ngOnChanges() { if (!this.forPreview) { - if (this.canAttempt && (this.canAttempt.attemptsMade >= this.canAttempt.attemptsAllowed)) { + if (this.canAttempt && (this.canAttempt.attemptsMade >= this.canAttempt.attemptsAllowed) && + this.questionTYP.FINAL_ASSESSMENT === this.primaryCategory) { if (!this.maxAttempPopup) { this.showAssessmentPopup() } - } } diff --git a/project/ws/viewer/src/lib/plugins/practice/practice.component.ts b/project/ws/viewer/src/lib/plugins/practice/practice.component.ts index 8e58146a0c..3c59fb517c 100644 --- a/project/ws/viewer/src/lib/plugins/practice/practice.component.ts +++ b/project/ws/viewer/src/lib/plugins/practice/practice.component.ts @@ -1638,15 +1638,17 @@ export class PracticeComponent implements OnInit, OnChanges, OnDestroy { if(this.selectedAssessmentCompatibilityLevel < 6) { this.init() } else { - this.quizSvc.canAttendV5(this.identifier).subscribe(response => { - if (response) { - this.canAttempt = response - // this.canAttempt = { - // attemptsAllowed: 1, - // attemptsMade: 0, - // } - } - }) + if(this.ePrimaryCategory.FINAL_ASSESSMENT == this.primaryCategory) { + this.quizSvc.canAttendV5(this.identifier).subscribe(response => { + if (response) { + this.canAttempt = response + // this.canAttempt = { + // attemptsAllowed: 1, + // attemptsMade: 0, + // } + } + }) + } this.retakeAssessment() }