Skip to content
Snippets Groups Projects
Commit d98059b7 authored by Hagen Dreßler's avatar Hagen Dreßler
Browse files

Edit html component of answer statistic

parent 866692a5
No related merge requests found
......@@ -7,17 +7,11 @@
{{ state.viewValue }}
</mat-option>
</mat-select>
<div *ngIf="selected == 1">
<div *ngFor="let statistic of statistics">
{{ statistic.name }}
<mat-progress-bar [value]="statistic.percent">
</mat-progress-bar>
<div align="right"> Responded answers: {{ statistic.answers }} </div>
</div>
</div>
<div *ngIf="selected == 2">
<!-- Add list of Question statistic -->
<!-- Need number of participants in room -->
<div *ngFor="let statistic of statistics">
{{ statistic.name }}
<mat-progress-bar [value]="statistic.percent">
</mat-progress-bar>
<div align="right"> Responded answers: {{ statistic.answers }} </div>
</div>
</mat-tab>
<!-- Add second tab with true false answers -->
......
......@@ -56,7 +56,7 @@ export class AnswerStatisticsComponent implements OnInit {
showStatistic(value) { /** refactor answer class structure for less code and more abstraction*/
this.statistics = [];
for (const question of this.content) {
if (value === 1) {
if (value == 1) {
const count = this.countTextAnswers(question.contentId);
this.statistics.push({
name: question.subject, answers: count, percent: count * 100 / this.textAnswers.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