Commit 9de97803 authored by Christopher Mark Fullarton's avatar Christopher Mark Fullarton
Browse files

Fixes confidence slider and reading confidence setting if they are disabled in the environment

parent 8be4e759
...@@ -189,6 +189,7 @@ export class QuizEntity extends AbstractEntity implements IQuizEntity { ...@@ -189,6 +189,7 @@ export class QuizEntity extends AbstractEntity implements IQuizEntity {
status: StatusProtocol.Success, status: StatusProtocol.Success,
step: MessageProtocol.Reset, step: MessageProtocol.Reset,
})); }));
clearTimeout(this._quizTimerInterval);
} }
public stop(): void { public stop(): void {
...@@ -324,10 +325,13 @@ export class QuizEntity extends AbstractEntity implements IQuizEntity { ...@@ -324,10 +325,13 @@ export class QuizEntity extends AbstractEntity implements IQuizEntity {
})); }));
this._quizTimer = this._questionList[this._currentQuestionIndex].timer; this._quizTimer = this._questionList[this._currentQuestionIndex].timer;
if (this._quizTimer === -1) { if (this._quizTimer <= 0) {
return; return;
} }
if (this._quizTimerInterval) {
clearInterval(this._quizTimerInterval);
}
this._quizTimerInterval = setInterval(() => { this._quizTimerInterval = setInterval(() => {
this._quizTimer--; this._quizTimer--;
this._socketChannel.forEach(socket => SendSocketMessageService.sendMessage(socket, { this._socketChannel.forEach(socket => SendSocketMessageService.sendMessage(socket, {
......
...@@ -175,7 +175,7 @@ export class MemberRouter extends AbstractRouter { ...@@ -175,7 +175,7 @@ export class MemberRouter extends AbstractRouter {
): Promise<object> { ): Promise<object> {
const activeQuiz: IQuizEntity = QuizDAO.getActiveQuizByName(quizName); const activeQuiz: IQuizEntity = QuizDAO.getActiveQuizByName(quizName);
if (!activeQuiz) { if (!activeQuiz || !nickname) {
return; return;
} }
const result: DeleteWriteOpResultObject = await activeQuiz.removeMember(nickname); const result: DeleteWriteOpResultObject = await activeQuiz.removeMember(nickname);
......
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