Fixes reset of the quiz for attendee data

parent ac9c3667
...@@ -5,7 +5,6 @@ import { MemberEntity } from '../../lib/entities/member/MemberEntity'; ...@@ -5,7 +5,6 @@ import { MemberEntity } from '../../lib/entities/member/MemberEntity';
import { StorageKey } from '../../lib/enums/enums'; import { StorageKey } from '../../lib/enums/enums';
import { QuizState } from '../../lib/enums/QuizState'; import { QuizState } from '../../lib/enums/QuizState';
import { IMemberSerialized } from '../../lib/interfaces/entities/Member/IMemberSerialized'; import { IMemberSerialized } from '../../lib/interfaces/entities/Member/IMemberSerialized';
import { IQuizResponse } from '../../lib/interfaces/quizzes/IQuizResponse';
import { MemberApiService } from '../api/member/member-api.service'; import { MemberApiService } from '../api/member/member-api.service';
import { QuizService } from '../quiz/quiz.service'; import { QuizService } from '../quiz/quiz.service';
import { StorageService } from '../storage/storage.service'; import { StorageService } from '../storage/storage.service';
...@@ -78,7 +77,12 @@ export class AttendeeService { ...@@ -78,7 +77,12 @@ export class AttendeeService {
public clearResponses(): void { public clearResponses(): void {
this._attendees.forEach((attendee) => { this._attendees.forEach((attendee) => {
attendee.responses.splice(0, attendee.responses.length, {} as IQuizResponse); attendee.responses.forEach(response => {
response.confidence = -1;
response.readingConfirmation = false;
response.responseTime = -1;
response.value = [];
});
}); });
} }
......
Markdown is supported
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