Merge branch 'master' of https://git.wmi.amu.edu.pl/s416178/Punktonerzy into wejscieDoTestu
This commit is contained in:
commit
88c5a9e9f3
@ -34,3 +34,10 @@
|
||||
.align {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.check
|
||||
{
|
||||
height: 35px;
|
||||
width: 35px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
@ -17,6 +17,11 @@
|
||||
<input type="number" step="1" min="0" name="time" class="form-control" [(ngModel)]="time" required/>
|
||||
</label>
|
||||
<br />
|
||||
<label class="block">
|
||||
<input type="checkbox" name="{{ help }}" class ="check" [checked]="help" (change)="changeHelp()"/> <p> Zezwól na skorzystanie z koła ratunkowego</p>
|
||||
</label>
|
||||
<br />
|
||||
<br />
|
||||
<p>Wpisz możliwe odpowiedzi i zaznacz prawidłową:</p>
|
||||
<div>
|
||||
<div *ngFor="let answer of answersCorrect; let i = index" class="row">
|
||||
|
@ -12,6 +12,7 @@ export class SingleChoiceQuestionComponent implements OnInit {
|
||||
@Input() edit: Boolean;
|
||||
|
||||
isChecked: Boolean = false;
|
||||
help: Boolean = false;
|
||||
answers: Array<Object> = [];
|
||||
answersCorrect: Array<Object> = [];
|
||||
newAttribute: any = {
|
||||
@ -45,6 +46,7 @@ export class SingleChoiceQuestionComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
this.points = this.content['content']['points'];
|
||||
this.help = this.content['content']['help'];
|
||||
} else {
|
||||
this.content = {};
|
||||
this.content['content'] = {
|
||||
@ -53,7 +55,8 @@ export class SingleChoiceQuestionComponent implements OnInit {
|
||||
question: '',
|
||||
answers: [],
|
||||
points: 1,
|
||||
time: 0
|
||||
time: 0,
|
||||
help: this.help
|
||||
};
|
||||
this.content['edit'] = false;
|
||||
}
|
||||
@ -110,6 +113,10 @@ export class SingleChoiceQuestionComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
changeHelp(): void {
|
||||
this.help = !this.help;
|
||||
}
|
||||
|
||||
addTable(): void {
|
||||
if ((this.question === undefined) || (this.question.trim().length === 0)) {
|
||||
this.snackBar.open('Pytanie nie może być puste!', null,
|
||||
@ -161,6 +168,7 @@ export class SingleChoiceQuestionComponent implements OnInit {
|
||||
this.content['content']['answers'] = this.answers;
|
||||
this.content['content']['points'] = this.points;
|
||||
this.content['content']['time'] = this.time;
|
||||
this.content['content']['help'] = this.help;
|
||||
if (this.edit) {
|
||||
this.editing.emit(this.content);
|
||||
} else {
|
||||
@ -189,6 +197,7 @@ export class SingleChoiceQuestionComponent implements OnInit {
|
||||
this.isChecked = false;
|
||||
this.question = '';
|
||||
this.time = 0;
|
||||
this.help = false;
|
||||
this.answers = [];
|
||||
this.answersCorrect = [];
|
||||
this.newAttribute = {};
|
||||
|
@ -6,6 +6,12 @@
|
||||
|
||||
}
|
||||
|
||||
.fifty
|
||||
{
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.radio-answer
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
<form #f="ngForm" (ngSubmit)="nextQuestion(f)" novalidate>
|
||||
<div class="alert alert-grey question">
|
||||
Pytanie za {{question.points}}pkt. <br /><span *ngIf="timeLeft > 0">Czas: {{ timeLeft }} sek. </span><span *ngIf="question.time === 0">Czas: bez limitu</span>
|
||||
<div *ngIf="question.help" class="fifty"><img src="./././././assets/50-50.png" width="80px" height="50px"></div>
|
||||
<div class="pytanie">{{question.question}} </div>
|
||||
<div class="answers">
|
||||
<div *ngFor="let item of question.answers" >
|
||||
|
@ -162,7 +162,8 @@ export class TestMakerComponent implements OnInit {
|
||||
time: this.test[i]['content']['time'],
|
||||
answers: this.test[i]['content']['answers'],
|
||||
points: this.test[i]['content']['points'],
|
||||
id: this.test[i]['content']['id']
|
||||
id: this.test[i]['content']['id'],
|
||||
help: this.test[i]['content']['help']
|
||||
});
|
||||
}
|
||||
toSend['body'] = body;
|
||||
|
BIN
FrontEnd/src/assets/50-50.png
Normal file
BIN
FrontEnd/src/assets/50-50.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 149 KiB |
Loading…
Reference in New Issue
Block a user