Skip to content
Snippets Groups Projects
Commit 71bdea69 authored by Lukas Mauß's avatar Lukas Mauß
Browse files

Implement skeleton for switch-bar-colors

parent 38d5f7bd
No related merge requests found
......@@ -35,6 +35,8 @@ export class StatisticComponent implements OnInit {
subject: string;
maxLength: number;
isLoading = true;
showsCorrect = false;
correctIndexes: number[];
constructor(protected route: ActivatedRoute,
private contentService: ContentService,
......@@ -50,6 +52,7 @@ export class StatisticComponent implements OnInit {
this.labels = new Array<string>();
this.answerList = new Array<AnswerList>();
this.data = new Array<number>();
this.correctIndexes = new Array<number>();
this.route.params.subscribe(params => {
this.contentId = params['contentId'];
});
......@@ -59,6 +62,22 @@ export class StatisticComponent implements OnInit {
});
}
switchAnswers() {
if (this.showsCorrect === false) {
this.showCorrect();
} else {
this.showNormal();
}
}
showCorrect() {
this.showsCorrect = true;
}
showNormal() {
this.showsCorrect = false;
}
getData(content: ContentChoice) {
this.subject = content.subject;
const length = content.options.length;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment