Skip to content
Snippets Groups Projects

Feature/41 add good answer in play quiz

Merged HUSS THEOPHILE requested to merge feature/41-add-good-answer-in-play-quiz into develop
Compare and
5 files
+ 49
7
Preferences
Compare changes
Files
5
@@ -20,11 +20,14 @@ export class MultipleChoiceComponent implements OnInit {
@@ -20,11 +20,14 @@ export class MultipleChoiceComponent implements OnInit {
}
}
ngOnInit(): void {}
ngOnInit(): void {}
 
async handleClick(id_answer: number, position: number) {
async handleClick(id_answer: number, position: number) {
this.answer_click = position;
const right_answer = await this.getAnswer(id_answer);
const right_answer = await this.getAnswer(id_answer);
 
console.log('right_answer : ', right_answer);
 
console.log('id_answer : ', id_answer);
for (let index = 0; index < this.answers.length; index++) {
for (let index = 0; index < this.answers.length; index++) {
this.good_answers[index] = this.answers[index].id == right_answer;
this.good_answers[index] = this.answers[index].id == right_answer;
}
}
 
this.answer_click = position;
}
}
}
}