Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions client/uis/screens/examscreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,20 @@ export class ExamModeUI extends UIScreen {
}
else {
this._loginScreen.hideForm();
this.setLoginButton(false);
this.showForm();
const begin_in = new Date(this._exam.begin_at).getTime() - Date.now();
setTimeout(() => {
this.setLoginButton(true);
}, begin_in);
return true;
}
}

public setLoginButton(enabled: boolean): void {
(this._form as UIExamModeElements).examStartButton.disabled = !enabled;
}

public get exam(): ExamForHost | null {
return this._exam;
}
Expand Down Expand Up @@ -121,8 +130,6 @@ export class ExamModeUI extends UIScreen {

// Returns true if the exam-start button is disabled, false otherwise
protected _enableOrDisableSubmitButton(): boolean {
const form = this._form as UIExamModeElements;
form.examStartButton.disabled = false; // Always enable the button
return false;
}

Expand Down