Commit bf32cf69 authored by Christopher Fullarton's avatar Christopher Fullarton

Adds check for editable quizzes to start them from the available-quizzes component

parent f05c8155
Pipeline #30206 passed with stages
in 13 minutes and 5 seconds
...@@ -69,8 +69,8 @@ export class AvailableQuizzesComponent implements IModal { ...@@ -69,8 +69,8 @@ export class AvailableQuizzesComponent implements IModal {
} }
this.quizApiService.getQuiz(session.name).subscribe((data) => { this.quizApiService.getQuiz(session.name).subscribe((data) => {
if (data.payload.state === QuizState.Inactive || data.step === MessageProtocol.Unavailable) { if (data.payload.state === QuizState.Inactive || [MessageProtocol.Unavailable, MessageProtocol.Editable].includes(data.step)) {
if (data.step === MessageProtocol.Unavailable) { if ([MessageProtocol.Unavailable, MessageProtocol.Editable].includes(data.step)) {
this.quizService.quiz = session; this.quizService.quiz = session;
} else { } else {
this.quizService.quiz = new QuizEntity(data.payload.quiz); this.quizService.quiz = new QuizEntity(data.payload.quiz);
......
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