From eeef8c49f6c61187f6ee4b2cbd20a458b4bb5dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Szczepa=C5=84ski?= Date: Thu, 23 Jan 2020 21:17:16 +0100 Subject: [PATCH] Fix --- FrontEnd/src/app/footer/footer.component.html | 2 +- .../true-false/true-false.component.html | 4 ++-- .../true-false/true-false.component.ts | 11 ++++++++++- .../test-details/test-details.component.html | 16 +++++++++------- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/FrontEnd/src/app/footer/footer.component.html b/FrontEnd/src/app/footer/footer.component.html index 1133d47..c8eee07 100644 --- a/FrontEnd/src/app/footer/footer.component.html +++ b/FrontEnd/src/app/footer/footer.component.html @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/FrontEnd/src/app/tests/test-details/question-view/true-false/true-false.component.html b/FrontEnd/src/app/tests/test-details/question-view/true-false/true-false.component.html index 7402a86..0966953 100644 --- a/FrontEnd/src/app/tests/test-details/question-view/true-false/true-false.component.html +++ b/FrontEnd/src/app/tests/test-details/question-view/true-false/true-false.component.html @@ -3,10 +3,10 @@
{{question.question}}
- +
- +
diff --git a/FrontEnd/src/app/tests/test-details/question-view/true-false/true-false.component.ts b/FrontEnd/src/app/tests/test-details/question-view/true-false/true-false.component.ts index f1717b8..f1132d9 100644 --- a/FrontEnd/src/app/tests/test-details/question-view/true-false/true-false.component.ts +++ b/FrontEnd/src/app/tests/test-details/question-view/true-false/true-false.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input, Output, EventEmitter, OnDestroy } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, OnDestroy, ElementRef, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { TestsService } from '../../../tests.service'; import * as $ from 'jquery'; @@ -17,6 +17,8 @@ export class TrueFalseComponent implements OnInit, OnDestroy { private verifyAnswerSubscription: ISubscription; interval: any; public timeLeft = 0; + @ViewChild('true') true: ElementRef; + @ViewChild('false') false: ElementRef; constructor(private route: ActivatedRoute, private testsService: TestsService) { } @@ -60,6 +62,13 @@ export class TrueFalseComponent implements OnInit, OnDestroy { if (this.timeLeft > 0) { this.startTimer(); } + if (this.true) { + this.true.nativeElement.checked = false; + } + + if (this.false) { + this.false.nativeElement.checked = false; + } } ngOnInit() {} diff --git a/FrontEnd/src/app/tests/test-details/test-details.component.html b/FrontEnd/src/app/tests/test-details/test-details.component.html index 3dd3b08..38fadf4 100644 --- a/FrontEnd/src/app/tests/test-details/test-details.component.html +++ b/FrontEnd/src/app/tests/test-details/test-details.component.html @@ -5,7 +5,7 @@
-
Twój wynik: {{prevMaxResult}}/{{maxPoints}}
+ @@ -15,12 +15,6 @@

{{test.title}}

-
- Poprzednia odpowiedź była poprawna. -
-
- Poprzednia odpowiedź była niepoprawna. -


@@ -37,6 +31,14 @@
+
+
+ Poprzednia odpowiedź była poprawna. +
+
+ Poprzednia odpowiedź była niepoprawna. +
+
Twój aktualny wynik: {{points}}/{{maxPoints}}