Fix
This commit is contained in:
parent
4b27eceaa9
commit
eeef8c49f6
@ -1,3 +1,3 @@
|
||||
<div class="footer">
|
||||
© 2019 Punktonerzy
|
||||
© 2020 Punktonerzy
|
||||
</div>
|
@ -3,10 +3,10 @@
|
||||
<div class="pytanie">{{question.question}} </div>
|
||||
<div class="answers" >
|
||||
<div (click)="chooseAnswer('Prawda')">
|
||||
<input type="radio" name="options" id="option1" class="radio-answer" autocomplete="off"><label for="option1">Prawda</label>
|
||||
<input #true type="radio" name="options" id="option1" class="radio-answer" autocomplete="off"><label for="option1">Prawda</label>
|
||||
</div>
|
||||
<div (click)="chooseAnswer('Fałsz')">
|
||||
<input type="radio" name="options" id="option2" class="radio-answer" autocomplete="off"> <label for="option2">Fałsz</label>
|
||||
<input #false type="radio" name="options" id="option2" class="radio-answer" autocomplete="off"> <label for="option2">Fałsz</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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() {}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div class="header">
|
||||
<button class="button" (click)="back()"><i class="fas fa-arrow-left"></i> Powrót</button>
|
||||
<span>
|
||||
<div *ngIf="currentUser">Twój wynik: {{prevMaxResult}}/{{maxPoints}}</div>
|
||||
<!-- <div *ngIf="currentUser">Twój wynik: {{prevMaxResult}}/{{maxPoints}}</div> -->
|
||||
<button title="Usuń" *ngIf="currentUser && currentUser.username === test.owner && (!isStarted || isEnded)" class="btn btn-study-cave" (click)="openPopup()"><i class="fas fa-trash-alt"></i></button>
|
||||
<button title="Edytuj" *ngIf="currentUser && currentUser.username === test.owner" class="btn btn-study-cave" (click)="edit()"><i class="fas fa-edit"></i></button>
|
||||
<button *ngIf="!isStarted && (test['permission'] !== 'GROUP' || (test['permission'] === 'GROUP' && !test['attempted'] && ((test['dateFrom'] < now && test['dateTo'] > now) || (test['isGroupOwner']))))" title="PDF" class="btn btn-study-cave" (click)="get()"><i class="fas fa-file-pdf"></i></button>
|
||||
@ -15,12 +15,6 @@
|
||||
<h3>{{test.title}}</h3>
|
||||
</div>
|
||||
|
||||
<div *ngIf="prevAnswerResultBool !== undefined && prevAnswerResultBool" class="alert alert-success">
|
||||
Poprzednia odpowiedź była poprawna.
|
||||
</div>
|
||||
<div *ngIf="prevAnswerResultBool !== undefined && !prevAnswerResultBool" class="alert alert-danger">
|
||||
Poprzednia odpowiedź była niepoprawna.
|
||||
</div>
|
||||
<div *ngIf="!isStarted && (test['permission'] !== 'GROUP' || (test['permission'] === 'GROUP' && !test['attempted'] && ((test['dateFrom'] < now && test['dateTo'] > now) || (test['isGroupOwner']))))">
|
||||
<br /><br />
|
||||
<button class="button" (click)="start()"> <i class="far fa-play-circle"></i> Rozpocznij test</button>
|
||||
@ -37,6 +31,14 @@
|
||||
|
||||
|
||||
<div class="question-view">
|
||||
<br />
|
||||
<div *ngIf="prevAnswerResultBool !== undefined && prevAnswerResultBool" class="alert alert-success">
|
||||
Poprzednia odpowiedź była poprawna.
|
||||
</div>
|
||||
<div *ngIf="prevAnswerResultBool !== undefined && !prevAnswerResultBool" class="alert alert-danger">
|
||||
Poprzednia odpowiedź była niepoprawna.
|
||||
</div>
|
||||
<div *ngIf="currentUser">Twój aktualny wynik: {{points}}/{{maxPoints}}</div>
|
||||
<app-question-view [question]="test.body[currentQuestionIndex]" [questionIndex]="currentQuestionIndex" [activeFifty]='lifebuoyTest' (emitNextQuestionRequest)="handleEmitNextQuestionRequest($event)" (lifebuoyTest)="LifebuoyFifty($event)" ></app-question-view>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user