diff --git a/FrontEnd/src/app/main-navigation/main-navigation.component.ts b/FrontEnd/src/app/main-navigation/main-navigation.component.ts index 7c31198..0c02214 100644 --- a/FrontEnd/src/app/main-navigation/main-navigation.component.ts +++ b/FrontEnd/src/app/main-navigation/main-navigation.component.ts @@ -20,7 +20,7 @@ export class MainNavigationComponent implements OnInit { } onOffMenuMobile() { - console.log(this.menu.nativeElement.style.display) + console.log(this.menu.nativeElement.style.display); if (this.menu.nativeElement.style.display === '') { this.menu.nativeElement.style.display = 'none'; this.btn.nativeElement.style.display = 'none'; diff --git a/FrontEnd/src/app/tests/test-details/question-view/single-choice/single-choice.component.html b/FrontEnd/src/app/tests/test-details/question-view/single-choice/single-choice.component.html index 996c506..2682e0a 100644 --- a/FrontEnd/src/app/tests/test-details/question-view/single-choice/single-choice.component.html +++ b/FrontEnd/src/app/tests/test-details/question-view/single-choice/single-choice.component.html @@ -19,5 +19,5 @@ - + diff --git a/FrontEnd/src/app/tests/test-details/question-view/single-choice/single-choice.component.ts b/FrontEnd/src/app/tests/test-details/question-view/single-choice/single-choice.component.ts index d3130db..ca80269 100644 --- a/FrontEnd/src/app/tests/test-details/question-view/single-choice/single-choice.component.ts +++ b/FrontEnd/src/app/tests/test-details/question-view/single-choice/single-choice.component.ts @@ -28,10 +28,18 @@ export class SingleChoiceComponent implements OnInit, OnDestroy { nextQuestion(f) { this.id = this.route.snapshot.params.id; - const answers = this.question.answers; + let answers = []; + if (this.fifty) { + this.fifty = false; + answers = this.question.answers_help; + } else { + answers = this.question.answers; + } + answers.forEach(element => { element.is_good = element.content === f.value.answer ? true : false; }); + const body = { id: this.question.id, type: 'single-choice', answers: answers }; this.verifyAnswerSubscription = this.testsService.verifyAnswer(this.id, body).subscribe(d => { $('.answers').find('[type="radio"]').prop('checked', false); @@ -44,10 +52,6 @@ export class SingleChoiceComponent implements OnInit, OnDestroy { this.lifebuoy.emit(false); } - noHelp() { - this.fifty = false; - } - startTimer() { this.interval = setInterval(() => { if (this.timeLeft > 0) {